Example #1
0
 void updateType(CardState c) {
   CardTypeView type = c.getType();
   if (CardView.this.getCurrentState() == this) {
     Card card = c.getCard();
     if (card != null) {
       type =
           type.getTypeWithChanges(
               card.getChangedCardTypes()); // TODO: find a better way to do this
       updateRulesText(card.getRules(), type);
     }
   }
   set(TrackableProperty.Type, type);
 }
Example #2
0
    void updateRulesText(CardRules rules, CardTypeView type) {
      String rulesText = null;

      if (type.isVanguard() && rules != null) {
        rulesText = "Hand Modifier: " + rules.getHand() + "\r\nLife Modifier: " + rules.getLife();
      }
      set(TrackableProperty.RulesText, rulesText);
    }