Skeetendo

’Cause all games were better on the GBC

You are not logged in.

#1 2015-10-28 07:29:03

Fotomac
Member
Registered: 2015-10-25
Post 22/281

No effect on Electric, Poison and Grass types

I want to make attacks such as Thunder Wave, PoisonPowder, and Leech Seed (afflicting Paralysis, Poison, and Leech Seed effect, respectively) so that if used against, respectively, an Electric-type, a Poison-type, or a Grass-type, the standard "It doesn't affect [INSERT POKéMON NAME HERE]" message is displayed. How would I do so?

Offline

#2 2015-10-28 08:38:49

Schattenjäger
Member
Registered: 2015-10-21
Post 6/25

Re: No effect on Electric, Poison and Grass types

This is what I did for steel types in the poison effect code:

.poisonEffect
call CheckTargetSubstitute
jr nz, .noEffect ; can't posion a substitute target
ld a, [hli]
ld b, a
and a
jr nz, .noEffect ; miss if target is already statused
ld a, [hli]
cp POISON ; can't posion a poison-type target
jr z, .noEffect
cp STEEL
jr z, .noEffect
ld a, [hld]
cp POISON ; can't posion a poison-type target
jr z, .noEffect
cp STEEL ; can't poison a steel Pokémon
jr z, .noEffect
ld a, [de]

Maybe you could make use of that.

Offline

#3 2015-10-28 08:54:42

Fotomac
Member
Registered: 2015-10-25
Post 23/281

Re: No effect on Electric, Poison and Grass types

Which one should I change to ".doesntAffect", if this is where I change any instance of ".noEffect" to ".doesntAffect"?

Offline

Board footer

Powered by FluxBB