コード例 #1
0
 protected int computeEffectsToRemove(
     final ArrayList<RunningEffect> effectToRemove,
     final RunningEffectManager effectManager,
     int newStateLevel) {
   for (final RunningEffect effect : effectManager) {
     if (!(effect instanceof StateRunningEffect)) {
       continue;
     }
     final State state = ((StateRunningEffect) effect).getState();
     if (state.getStateBaseId() != this.m_value
         || (state.isInamovable()
             && !ApplyState.UNDECURSABLE_STATE.contains(state.getStateBaseId()))) {
       continue;
     }
     effectToRemove.add(effect);
     newStateLevel = state.getLevel() - this.m_levelToDecrease;
   }
   return newStateLevel;
 }