public int upgradeBonus(Object refers) {
    if (upgrades == null) return 0 ;
    int bonus = 0 ;
    for (int i = 0 ; i < upgrades.length ; i++) {
      final Upgrade u = upgrades[i] ;
      if (u == null || upgradeStates[i] != STATE_INTACT) continue ;
      if (u.refers == refers) bonus += u.bonus ;
    }
    return bonus ;
  }