public override bool is_successful_hit(TactileLibrary.Data_Weapon weapon) { if (weapon.Barrier()) { return(true); } // If the attacker didn't hit themself (how does this happen with staves), // returns true when damage or status effects happened return(!Result.backfire && (Result.dmg != 0 || Result.state_change.Count > 0)); }
internal static Staff_Modes get_staff_mode(int weaponId) { TactileLibrary.Data_Weapon weapon = Global.data_weapons[weaponId]; // Healing if (weapon.Heals()) { return(Staff_Modes.Heal); } // Status healing else if (!weapon.is_attack_staff() && weapon.Status_Remove.Count > 0) { return(Staff_Modes.Heal); } // Status infliction else if (weapon.is_attack_staff()) { return(Staff_Modes.Status_Inflict); } // Barrier else if (weapon.Barrier()) { return(Staff_Modes.Heal); } // Positive Status else if (weapon.Status_Inflict.Count > 0) { return(Staff_Modes.Heal); } // Flare else if (weapon.Torch()) { return(Staff_Modes.Torch); } else { return(Staff_Modes.Other); } }
public static Staff_Target_Mode target_mode(TactileLibrary.Data_Weapon staff) { if (staff.is_attack_staff()) { return(Staff_Target_Mode.Status_Inflict); } else if (staff.Torch()) { return(Staff_Target_Mode.Torch); } else if (staff.Heals()) { return(Staff_Target_Mode.Heal); } else if (staff.Barrier()) { return(Staff_Target_Mode.Barrier); } else { return(Staff_Target_Mode.Heal); } }