Implement buff moves

Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
master
sigonasr2 2 years ago
parent ed9174c134
commit 78979b4eca
  1. 10
      SeasonsOfLoneliness.cpp

@ -881,6 +881,8 @@ public:
FIRESTORM->treeBurnChance=1;
FIRESTORM->burnTrees=true;
SNOWSTORM->appliesSlow=true;
HIDE->appliesHide=true;
HYPERZAP->appliesSpeed=true;
LIGHT_STORM->lowPriority=true;
@ -1866,6 +1868,7 @@ public:
}
} else
if (EFFECT_TIMER==ref->effectTime-10){
if (!isBuffMove(ref)) {
if (BATTLE_CURRENT_TURN_ENTITY==-1) {
if (FOOD_REGEN_TURNS>0) {
FOOD_REGEN_TURNS--;
@ -1886,6 +1889,7 @@ public:
CURRENT_ENCOUNTER.entities[BATTLE_CURRENT_TURN_ENTITY]->spr=X_X_DECAL;
}
}
}
} else
if (EFFECT_TIMER==ref->effectTime/2){
addSeeds(ref->seedProduction);
@ -3423,6 +3427,12 @@ public:
power->name.compare("Petal Storm")==0;
}
bool isBuffMove(WEATHER_POWER*power) { //ONLY Buff moves with no damaging/healing effects go in here.
return
power->name.compare("Hide")==0||
power->name.compare("Hyper Zap")==0;
}
bool isFoodMove(WEATHER_POWER*power) {
return
power->name.compare("Meal")==0||

Loading…
Cancel
Save