public override void ReactTo(ISupplement otherSupplement) { if (otherSupplement is WeaponrySkill) { this.hasEffect = true; } }
protected override void ExecuteAddSupplementCommand(string[] commandWords) { var supplementType = commandWords[1]; ISupplement supplement = null; switch (supplementType) { case "AggressionCatalyst": supplement = new AggressionCatalyst(); break; case "PowerCatalyst": supplement = new PowerCatalyst(); break; case "HealthCatalyst": supplement = new HealthCatalyst(); break; case "Weapon": supplement = new Weapon(); break; default: break; } var unitId = commandWords[2]; var unit = this.GetUnit(unitId); if (unit != null) { unit.AddSupplement(supplement); } }
public override void ReactTo(ISupplement otherSupplement) { if (otherSupplement is InfestationSpores) { this.hasEffect = false; } }
public override void ReactTo(ISupplement otherSupplement) { if (otherSupplement is WeaponrySkill) { this.hasEffect = true; } }
public override void ReactTo(ISupplement otherSupplement) { if (otherSupplement is InfestationSpores) { this.hasEffect = false; } }
public void ReactTo(ISupplement otherSupplement) { if (otherSupplement is InfestationSpores) { this.powerEffect = 0; this.aggressionEffect = 0; } }
public override void ReactTo(ISupplement otherSupplement) { if (otherSupplement.GetType().Name == ReactionSupplement) { this.powerEffect = PowerEffectModifier; this.aggressionEffect = AggressionEffectModifier; } }
public void ReactTo(ISupplement otherSupplement) { if (otherSupplement is WeaponrySkill) { _powerEffect = 10; _aggressionEffect = 3; } }
public void ReactTo(ISupplement otherSupplement) { if (otherSupplement.GetType().Name == "WeaponrySkill") { this.PowerEffect = 10; this.AggressionEffect = 3; } }
//Adds supplement to user's supplement list. public void AddSupplement(ISupplement supplement) { if (supplement == null) { throw new ArgumentException("Supplement cannot be null."); } this.supplements.Add(supplement); }
public override void ReactTo(ISupplement otherSupplement) { if (otherSupplement is WeaponrySkill) { this.powerEffect = 10; this.aggressionEffect = 3; } }
public void ReactTo(ISupplement otherSupplement) { if (otherSupplement.GetType() == typeof(WeaponrySkill)) { this.powerEffect += 10; this.aggressionEffect += 3; } }
public void ReactTo(ISupplement otherSupplement) { if (otherSupplement is InfestationSpores) { this.aggressionEffect = 0; this.powerEffect = 0; } }
public void ReactTo(ISupplement otherSupplement) { if (otherSupplement is WeaponrySkill && this.powerEffect == 0 && this.aggressionEffect == 0) { this.powerEffect = 10; this.aggressionEffect = 3; } }
public override void ReactTo(ISupplement otherSupplement) { if (otherSupplement is WeaponrySkill) { this.PowerEffect = Weapon.GeneralPowerEffect; this.AggressionEffect = Weapon.GeneralAgressionIncrease; } }
public override void ReactTo(ISupplement otherSupplement) { if (otherSupplement.GetType().Name == "InfestationSpores") { this.AggressionEffect = 0; this.PowerEffect = 0; } }
public override void ReactTo(ISupplement otherSupplement) { if (otherSupplement is InfestationSpores) { this.PowerEffect = 0; this.AggressionEffect = 0; } }
public void ReactTo(ISupplement otherSupplement) { if (otherSupplement.GetType().Name == this.GetType().Name) { this.AggressionEffectConst = 0; this.PowerEffectConst = 0; } }
public override void ReactTo(ISupplement otherSupplement) { if (otherSupplement is InfestationSpores) { this.PowerEffect = 0; this.AggressionEffect = 0; } }
public void ReactTo(ISupplement otherSupplement) { if (otherSupplement.GetType() == typeof(InfestationSpores)) { this.powerEffect = 0; this.aggressionEffect = 0; } }
public override void ReactTo(ISupplement otherSupplement) { var weaponrySkill = otherSupplement as WeaponrySkill; if (weaponrySkill != null) { this.isActive = true; } }
public override void ReactTo(ISupplement otherSupplement) { //if (otherSupplement is AggressionCatalyst)//.GetType().Name == "Weapon") //{ // AggressionCatalyst supplement = otherSupplement as AggressionCatalyst; // supplement.AggressionEffect += CatalystAggression; //} }
public void ReactTo(ISupplement otherSupplement) { if (otherSupplement is WeaponrySkill) { this.PowerEffect = 10; this.AggressionEffect = 3; } }
public override void ReactTo(ISupplement otherSupplement) { if (otherSupplement is WeaponrySkill) { this.PowerEffect = Weapon.WeaponPotentialPowerEffect; this.AggressionEffect = Weapon.WeaponPotentialAggressionEffect; } }
public override void ReactTo(ISupplement otherSupplement) { if (otherSupplement is WeaponrySkill) { this.PowerEffect = 10; this.AggressionEffect = 3; } }
public override void ReactTo(ISupplement otherSupplement) { if (otherSupplement.GetType().Name == "WeaponrySkill") { this.AggressionEffect = 3; this.PowerEffect = 10; } }
public override void ReactTo(ISupplement otherSupplement) { var infestationSpore = otherSupplement as InfestationSpores; if (infestationSpore != null && infestationSpore.isActive) { this.isActive = false; } }
public override void ReactTo(ISupplement otherSupplement) { if (otherSupplement.GetType().Name == ReactionSupplement) { this.powerEffect = PowerEffectModifier; this.aggressionEffect = AggressionEffectModifier; } }
public override void ReactTo(ISupplement otherSupplement) { if (otherSupplement is WeaponrySkill) { this.PowerEffect = WeaponPowerEffect; this.AggressionEffect = WeaponAggressionEffect; } }
public override void ReactTo1(ISupplement otherSupplement) { if (otherSupplement is WeaponrySkill) { base.powerEffect += 10; base.aggressionEffect += 3; } }
private void AddSupplementToUnit(string unitId, ISupplement supplement) { var unit = this.GetUnit(unitId); if (unit != null) { unit.AddSupplement(supplement); } }
public override void ReactTo(ISupplement otherSupplement) { if (otherSupplement.GetType().Name == "InfestationSpores") { this.AggressionEffect = 0; this.HealthEffect = 0; this.PowerEffect = 0; } }
public override void ReactTo1(ISupplement otherSupplement) { if (otherSupplement is InfestationSpores) { var a = (Supplement)otherSupplement; a.aggressionEffect = 0; a.powerEffect = 0; } }
public void ReactTo(ISupplement otherSupplement) { //impl : Supplement does not accumulate if (otherSupplement is InfestationSpores) { _powerEffect = 0; _aggressionEffect = 0; } }
public override void ReactTo(ISupplement otherSupplement) { var weaponrySkill = otherSupplement as WeaponrySkill; if (weaponrySkill != null) { this.isActive = true; } }
public override void ReactTo(ISupplement otherSupplement) { if (otherSupplement is WeaponrySkill) { this.PowerEffect = Weapon.WeapPower; this.AggressionEffect = Weapon.WeapAggression; this.HealthEffect = Weapon.WeapHealth; } }
public virtual void AddSupplement(ISupplement newSupplement) { foreach (var supplement in this.supplements) { newSupplement.ReactTo(supplement); } this.supplements.Add(newSupplement); }
public override void ReactTo(ISupplement otherSupplement) { if(otherSupplement is WeaponrySkill) { this.PowerEffect = Weapon.WeapPower; this.AggressionEffect = Weapon.WeapAggression; this.HealthEffect = Weapon.WeapHealth; } }
protected void InsertSupplyment(ISupplement supplyment, string id) { var unit = this.containedUnits .Where(u => u.Id == id) .Select(u => u as Human) .First(); unit.AddSupplement(supplyment); }
public override void ReactTo(ISupplement otherSupplement) { var infestationSpore = otherSupplement as InfestationSpores; if (infestationSpore != null && infestationSpore.isActive) { this.isActive = false; } }
private string CreateQuery(ISupplement suppement) { var query = new StringBuilder(); if (suppement.SupplementId != 0) { query.Append($"WHERE SupplementId={suppement.SupplementId}"); } if (suppement.SupplementName != null && !suppement.SupplementName.Equals(string.Empty)) { if (query.Length == 0) { query.Append("WHERE "); } else { query.Append(" AND "); } query.Append($"SupplementName LIKE N'%{suppement.SupplementName}%'"); } if (suppement.SupplementWeight != 0) { if (query.Length == 0) { query.Append("WHERE "); } else { query.Append(" AND "); } query.Append($"SupplementWeight ={suppement.SupplementWeight}"); } if (suppement.SupplementPrice != 0) { if (query.Length == 0) { query.Append("WHERE "); } else { query.Append(" AND "); } query.Append($"SupplementPrice={suppement.SupplementPrice}"); } return(query.ToString()); }
public override void ReactTo(ISupplement otherSupplement) { if (otherSupplement is WeaponrySkill) { this.PowerEffect += Weapon.WeaponActivatedPower; this.AggressionEffect += Weapon.WeaponActivatedAggression; } else { base.ReactTo(otherSupplement); } }
public int Count(ISupplement searchSupplement) { string query = string.Empty; if (searchSupplement != null) { query = CreateQuery(searchSupplement); } return(_context.ExecuteScalar <int>(@" SELECT COUNT(SupplementId) FROM Supplements " + query)); }
public override void ReactTo(ISupplement otherSupplement) { if (otherSupplement is WeaponrySkill) { this.PowerEffect = Weapon.WeaponPowerEffect; this.HealthEffect = Weapon.WeaponHealthEffect; this.AggressionEffect = Weapon.WeaponAggressionEffect; } else { // Weapon.ReactTo(WeaponrySkill); this.PowerEffect = 0; this.HealthEffect = 0; this.AggressionEffect = 0; } }
public bool UpdateSupplement(ISupplement updateSupplement) => _context.Execute(@" UPDATE Supplements SET SupplementName = @supplementname ,SupplementDescription = @supplementdescription ,SupplementPrice = @supplementprice ,SupplementWeight = @supplementweight WHERE SupplementId = @supplementid ", new { supplementid = updateSupplement.SupplementId, supplementname = updateSupplement.SupplementName, supplementdescription = updateSupplement.SupplementDescription, supplementprice = updateSupplement.SupplementPrice, supplementweight = updateSupplement.SupplementWeight }) != 0;
public bool InsertSupplement(ISupplement supplement) { supplement.SupplementId = GetIdForNextSupplement(); if (supplement.SupplementId == 0) { supplement.SupplementId++; } return(_context.Execute(@" INSERT Supplements(SupplementId, SupplementName, SupplementDescription, SupplementPrice, SupplementWeight) VALUES (@supplementid, @supplementname, @supplementdescription, @supplementprice, @supplementweight) ", new { supplementid = supplement.SupplementId, supplementname = supplement.SupplementName, supplementdescription = supplement.SupplementDescription, supplementprice = supplement.SupplementPrice, supplementweight = supplement.SupplementWeight }) != 0); }
public override void AddSupplement(ISupplement newSupplement) { base.AddSupplement(newSupplement); }
public override void ReactTo(ISupplement otherSupplement) { base.ReactTo(otherSupplement); }
public abstract void ReactTo(ISupplement otherSupplement);
public override void ReactTo(ISupplement otherSupplement) { if (!(otherSupplement is WeaponrySkill)) return; base.AggressionEffect = 3; base.PowerEffect = 10; }
public virtual void ReactTo(ISupplement otherSupplement) { // throw new NotImplementedException(); }
public virtual void ReactTo(ISupplement otherSupplement) { }
public virtual void AddSupplement(ISupplement newSupplement) { foreach (var supplement in this.supplements) { newSupplement.ReactTo(supplement); } this.supplements.Add(newSupplement); }
public override void ReactTo(ISupplement otherSupplement) { }
public override void ReactTo(ISupplement otherSupplement) { throw new System.NotImplementedException(); }
public static SupplementDTO Convert(ISupplement supplement) { return new SupplementDTO() { Id = supplement.Id, IsHourCanceled = supplement.IsHourCanceled, Hour = Convert(supplement.Hour), Schedule = Convert(supplement.Schedule), Teacher = supplement.Teacher == null ? null : Convert(supplement.Teacher) }; }
public virtual void ReactTo(ISupplement otherSupplement) { this.AggressionEffect += otherSupplement.AggressionEffect; this.HealthEffect += otherSupplement.HealthEffect; this.PowerEffect += otherSupplement.PowerEffect; }