Dancer_A

super charge i think

Nov 3rd, 2022 (edited)
1,370
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.72 KB | None | 0 0
  1. if (actor.has_skill("CHARGE") // does the actor have the skill
  2.     if (Temp_Moved >= 1 && !(Global.game_system.home_base | Global.game_system.In_Arena || Global.scene.is_test_battle) // have they at least moved 1 tile and are not in a non-normal battle
  3.     {
  4.     int counter = Temp_Moved; // counter is now equal to how many tiles moved
  5.     int max = 4; // whatever the max value is
  6.     int bonus = 0; // will be added to n
  7.         while (counter >= 2) // do this when counter is at least 2, if counter is 0 or 1 this will be skipped
  8.         {
  9.             bonus++; // increase n
  10.             counter -= 2; // decrease counter by 2
  11.         }
  12.     n += Math.Min(bonus,max); // n will only get as high as that maximum value allows
  13.     }
  14.    
Advertisement
Add Comment
Please, Sign In to add comment