public static bool IsActor(int uniqId) { if (BattlerDictionary.GetBattlerByUniqId(uniqId).battlerType == BattlerEnum.BattlerType.Actor) { return(true); } return(false); }
public static bool IsAppropriate(string skillId, int fromUniqId, int toUniqId) { var skill = SkillsDicionary.GetSkillById(skillId); var fromBattler = BattlerDictionary.GetBattlerByUniqId(fromUniqId); var toBattler = BattlerDictionary.GetBattlerByUniqId(toUniqId); if ((skill.target == SkillConsts.ENEMY || skill.target == SkillConsts.ALL_ENEMY || skill.target == SkillConsts.RANDOM_ENEMY) && toBattler.battlerType != fromBattler.battlerType) { return(true); } if ((skill.target == SkillConsts.MEMBER || skill.target == SkillConsts.ALL_MEMBER || skill.target == SkillConsts.RANDOM_MEMBER) && toBattler.battlerType == fromBattler.battlerType) { return(true); } return(false); }