Apply the bonus to a character. The bonus can optionally only be added once no matter how many associated choices this object has. This is normally used where a bonus is added for each associated choice. @param bonusString The unparsed bonus to be added. @param chooseString Th
(String bonusString, String chooseString, PlayerCharacter aPC, CDOMObject target)
| 44 | * The character to apply thr bonus to. |
| 45 | */ |
| 46 | public static void applyBonus(String bonusString, String chooseString, PlayerCharacter aPC, CDOMObject target) |
| 47 | { |
| 48 | bonusString = makeBonusString(bonusString, chooseString, aPC); |
| 49 | |
| 50 | final BonusObj aBonus = Bonus.newBonus(Globals.getContext(), bonusString); |
| 51 | if (aBonus != null) |
| 52 | { |
| 53 | aPC.addSaveableBonus(aBonus, target); |
| 54 | } |
| 55 | } |
| 56 | |
| 57 | /** |
| 58 | * Remove the bonus from this objects list of bonuses. |