Example #1
0
 bool CanSummon(string playerUUID, string monsterID)
 {
     if (GetPlayer(playerUUID).HasCrests(RequestedCrestData.GetRequestedCrestDatasFromCosts(gameData.GetMonster(monsterID).Costs)))
     {
         return(true);
     }
     return(false);
 }
Example #2
0
 bool CanAttack(string playerUUID, int agentIndex, int targetAgentIndex, int attackIndex)
 {
     if (IsTurnAndPhase(playerUUID, TurnPhase.Battle))
     {
         if (board.GetAgent(agentIndex).MonsterData != null &&
             board.GetAgent(targetAgentIndex).MonsterData != null &&
             GetPlayer(playerUUID).HasCrests(RequestedCrestData.GetRequestedCrestDatasFromCosts(board.GetAgent(agentIndex).MonsterData.SpecialAbilities[attackIndex].Costs)))
         {
             float distance = TwoDCoordinate.FlyDistance(board.GetAgent(agentIndex).TileData.coordinates, board.GetAgent(targetAgentIndex).TileData.coordinates);
             if (distance <= board.GetAgent(agentIndex).MonsterData.SpecialAbilities[attackIndex].Range)
             {
                 return(true);
             }
         }
     }
     return(false);
 }