Exemple #1
0
        public int getActionPoints(NewLogic logic)
        {
            int id = getID();
            NewCharacterStatus player1 = logic.getStatusByPlayerID(1);
            NewCharacterStatus player2 = logic.getStatusByPlayerID(2);
            NewCharacterStatus target  = player1.character.newSkillDic.ContainsKey("Skill" + id) && player1.character.newSkillDic["Skill" + id] == this ? player1 : null;

            if (target == null)
            {
                target = player2.character.newSkillDic.ContainsKey("Skill" + id) && player2.character.newSkillDic["Skill" + id] == this ? player2 : null;
            }
            if (target == null)
            {
                return(getActionPoints());
            }
            else
            {
                return(Mathf.RoundToInt((float)target.getCurrentIndex("Skill" + id + "_aps")));
            }
        }
Exemple #2
0
        public bool canCastSkill(NewLogic logic)
        {
            int id = getID();
            NewCharacterStatus player1 = logic.getStatusByPlayerID(1);
            NewCharacterStatus player2 = logic.getStatusByPlayerID(2);
            NewCharacterStatus target  = player1.character.newSkillDic.ContainsKey("Skill" + id) && player1.character.newSkillDic["Skill" + id] == this ? player1 : null;

            if (target == null)
            {
                target = player2.character.newSkillDic.ContainsKey("Skill" + id) && player2.character.newSkillDic["Skill" + id] == this ? player2 : null;
            }
            if (target == null)
            {
                return(true);
            }

            bool canAttack = target.canAttack();

            return((getType() == SkillType.Buff && target.checkCondition(getCondition())) ||
                   (getType() == SkillType.Active && target.checkCondition(getCondition()) && canAttack));
        }
 public ConditionManager(NewCharacterStatus char_Status, NewLogic logic)
 {
     this.owner = char_Status;
     this.logic = logic;
 }