Пример #1
0
 protected void updateEffort(CharacterActionChitComponent clickedChit, int count) {
   currentCount += count;
   if (clickedChit.isAnyEffort()) return;
   if (countsAsMove(clickedChit) && move != INFINITE) {
     move += count;
     if (move < 0 && !canMakeChange()) {
       lostAsterisks -= move;
       currentCount -= move;
       move = 0;
     }
   } else if (countsAsFight(clickedChit) && fight != INFINITE) {
     fight += count;
     if (fight < 0 && !canMakeChange()) {
       lostAsterisks -= fight;
       currentCount -= fight;
       fight = 0;
     }
   } else if (countsAsMagic(clickedChit) && magic != INFINITE) {
     magic += count;
     if (magic < 0 && !canMakeChange()) {
       lostAsterisks -= magic;
       currentCount -= magic;
       magic = 0;
     }
   }
 }
Пример #2
0
 protected boolean countsAsFight(CharacterActionChitComponent chit) {
   return chit.isFight() || chit.isFightAlert() || chit.isAnyEffort();
 }
Пример #3
0
 protected boolean countsAsMagic(CharacterActionChitComponent chit) {
   return chit.isColor() || chit.isMagic() || chit.isAnyEffort();
 }
Пример #4
0
 protected boolean countsAsMove(CharacterActionChitComponent chit) {
   return chit.isMove() || chit.isFly() || chit.isAnyEffort();
 }