protected override void ExecuteAddSupplementCommand(string[] commandWords) { switch (commandWords[1]) { case "PowerInhibitor": { var powerInhibitor = new PowerInhibitor(); var targetUnit = base.GetUnit(commandWords[2]); targetUnit.AddSupplement(powerInhibitor); break; } case "HealthInhibitor": { var healthInhibitor = new HealthInhibitor(); var targetUnit = base.GetUnit(commandWords[2]); targetUnit.AddSupplement(healthInhibitor); break; } case "AggressionInhibitor": { var aggressionInhibitor = new AggressionInhibitor(); var targetUnit = base.GetUnit(commandWords[2]); targetUnit.AddSupplement(aggressionInhibitor); break; } case "Weapon": { var weapon = new Weapon(); var targetUnit = base.GetUnit(commandWords[2]); targetUnit.AddSupplement(weapon); break; } default: break; } }
protected override void ExecuteAddSupplementCommand(string[] commandWords) { switch (commandWords[1]) { case "PowerInhibitor": { var inhibitor= new PowerInhibitor(); var target = this.GetUnit(commandWords[2]); target.AddSupplement(inhibitor); } break; case "HealthInhibitor": { var inhibitor = new HealthInhibitor(); var target = this.GetUnit(commandWords[2]); target.AddSupplement(inhibitor); } break; case "AggressionInhibitor": { var inhibitor = new AggressionInhibitor(); var target = this.GetUnit(commandWords[2]); target.AddSupplement(inhibitor); } break; case "Weapon": { var weapon = new Weapon(); var target = this.GetUnit(commandWords[2]); target.AddSupplement(weapon); } break; default: base.ExecuteAddSupplementCommand(commandWords); break; } }