BlowDryGuy

Male
Himalayas
Seen November 25th, 2016
Posted October 31st, 2016
53 posts
5.3 Years
In my game I've added a new type, the Chaos-type.
This type is unique in that it is super effective against all types with a few exceptions.
I want to make it so pokemon that aren't Chaos-type will deal less damage when they use Chaos moves. Specifically, I would like non-chaos types to deal x1.3 super effective damage instead of x2 damage when using a Chaos move. How would I go about doing that?

Rot8er_ConeX

Male
The Dissa Region
Seen February 22nd, 2018
Posted May 8th, 2017
822 posts
5.5 Years
Script Section PokeBattle_Move, in the function def pbCalcDamage( (which starts on line 571), find line 1036. It should read like this:
      typemod=pbTypeModMessages(type,attacker,opponent)
Add this directly below it:
      typemod=16.0 if isConst?(type,PBTypes,:CHAOS)
      typemod=10.4 if isConst?(type,PBTypes,:CHAOS) && !attacker.pbHasType?(:CHAOS)
A typemod of 8 means the attack is neutrally effective.
A typemod of 16 is standard super effectiveness.
8 multiplied by 1.3 is 10.4, so a typemod of 10.4 means that type effectiveness is 1.3


Note, however, that in this case, STAB mechanics would apply. A Chaos-type Pokemon (which would give the move a 2x effectiveness) would receive STAB on the Chaos-type move, whereas a non-Chaos type Pokemon (which would give the move a 1.3x effectiveness) would not. STAB is 1.5x damage output, or 2x damage output with the ability Adaptability.

This means that:
Chaos-type move used by Chaos-type Pokemon with Adaptability
2x * 2x (effectiveness * Adaptability STAB) = 4x damage

Chaos-type move used by Chaos-type Pokemon with some other ability
2x * 1.5x (effectiveness * STAB) = 3x damage

Chaos-type move used by non-Chaos-type Pokemon, with or without Adaptability
1.3x (effectiveness) = 1.3x damage

Do you want these moves to be that powerful? If not, might I suggest removing STAB mechanics from Chaos moves? This would be done by replacing line 1027, which reads:
    if attacker.pbHasType?(type) && (options&IGNOREPKMNTYPES)==0
with these two lines:
    if isConst?(type,PBTypes,:CHAOS)
    elsif attacker.pbHasType?(type) && (options&IGNOREPKMNTYPES)==0
Features of Pokemon Entropy

The black circular "doodles" in the lower right corner of my avatar are actually my username written in Gallifreyan. Yes I'm a Whovian.