Esempio n. 1
0
 private static bool ResolveOnDeathEffect(string effectType, EncounterState state)
 {
     if (effectType == OnDeathEffectType.PLAYER_VICTORY)
     {
         state.NotifyPlayerVictory();
         return(false);
     }
     else if (effectType == OnDeathEffectType.PLAYER_DEFEAT)
     {
         state.NotifyPlayerDefeat();
         return(false);
     }
     else
     {
         throw new NotImplementedException(String.Format("Don't know how to resolve on death effect type {0}", effectType));
     }
 }
Esempio n. 2
0
 private static bool ResolveOnDeathEffect(DestroyAction action, string effectType, EncounterState state)
 {
     if (effectType == OnDeathEffectType.PLAYER_VICTORY)
     {
         state.NotifyPlayerVictory();
         return(true);
     }
     else if (effectType == OnDeathEffectType.PLAYER_DEFEAT)
     {
         state.NotifyPlayerDefeat();
         return(true);
     }
     else if (effectType == OnDeathEffectType.REMOVE_FROM_UNIT)
     {
         var unit = state.GetUnit(state.GetEntityById(action.ActorId).GetComponent <UnitComponent>().UnitId);
         unit.NotifyEntityDestroyed(state.GetEntityById(action.ActorId));
         return(false);
     }
     else
     {
         throw new NotImplementedException(String.Format("Don't know how to resolve on death effect type {0}", effectType));
     }
 }