Dancer_A

AS Manipulation

Dec 27th, 2023 (edited)
909
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.10 KB | None | 0 0
  1. // Game_Unit_Skill.cs
  2. // this is new
  3.         public int bonus_attack_spd(Game_Unit target, int? distance, WeaponTriangle tri)
  4.         {
  5.             int spd = 0;
  6.             // whatever skills here
  7.             return spd;
  8.         }
  9.  
  10. // Game_Unit.cs
  11.         private int attacks_per_round(int spd, Combat_Map_Object target, int distance)
  12.         {
  13.  
  14.             WeaponTriangle tri = WeaponTriangle.Nothing; // added
  15.             if (target.is_unit() && !is_double_disabled())
  16.                 if (!stop_follow_up_modifiers(target as Game_Unit) && !(target as Game_Unit).stop_follow_up_modifiers(this))
  17.                 {
  18.                     int target_spd = (target as Game_Unit).atk_spd(distance);
  19.                     spd += bonus_attack_spd(target as Game_Unit, distance, tri); // added
  20.                     target_spd += (target as Game_Unit).bonus_attack_spd(this, distance, tri); // added
  21.                     // If enough faster than the opponent, attack twice
  22.                     if (spd - Constants.Combat.DBL_ATK_SPD >= target_spd)
  23.                         return 2;
  24.                 }
  25.             return 1;
  26.         }
Advertisement
Add Comment
Please, Sign In to add comment