public void updateVisuals() { if (ActiveNature == null) { this.name = "Junimo Rod"; this.description = "Mysterious natural magic flows through this wand."; } else { this.name = string.Format("Junimo Rod - {0} ({1})", ActiveNature.getName(), Charges); this.description = ActiveNature.getDescription(); } }
public void executeMagic(GameLocation location, int x, int y, int power, SFarmer who) { if (Charges > 0 && ActiveNature != null && ActiveNature.activate(location, x, y, power, who)) { if (ActiveNature.playWandSound()) { Game1.playSound("wand"); } Charges--; } else { Game1.playSound("wand"); Game1.showGlobalMessage("The rod shimmers, but nothing seems to happen."); } }