/// <summary> /// Create a new WarheadType with splash damage. /// </summary> /// <param name="dam"> /// One-time damage <see cref="System.Byte"/> /// </param> /// <param name="siz"> /// size <see cref="System.Byte"/> /// </param> /// <param name="splshd"> /// splash damage <see cref="System.Byte"/> /// </param> /// <param name="splshrd"> /// splash radius <see cref="System.Byte"/> /// </param> /// <param name="t"> /// primary type <see cref="Types"/> /// </param> public WarheadType(byte dam, byte siz, byte splshd, byte splshrd, Types t) { damage = dam; size = siz; splashDam = splshd; splashRad = splshrd; primary = t; protoType = new Warhead(this); }
/// <summary> /// Create a new warheadType /// </summary> /// <param name="dam"> /// Damage <see cref="System.Byte"/> /// </param> /// <param name="siz"> /// size <see cref="System.Byte"/> /// </param> /// <param name="t"> /// primary type <see cref="Types"/> /// </param> /// <param name="t2"> /// secondary type <see cref="Types"/> /// </param> public WarheadType(byte dam, byte siz, Types t, Types t2) { damage = dam; size = siz; splashDam = 0; splashRad = 0; primary = t; secondary = t2; protoType = new Warhead(this); }
/// <summary> /// Copy ctor /// </summary> /// <param name="w"> /// A <see cref="Warhead"/> /// </param> public Warhead(Warhead w) : base() { init(); this.Type = w.Type; }
/// <summary> /// Apply damage to this armor. The armor takes some damage /// and also mitigates the damage done. /// </summary> /// <param name="w"> /// A <see cref="Warhead"/> /// </param> /// <returns> /// The amount of damage not absorbed by the armor. <see cref="System.Byte"/> /// </returns> public byte applyDamage(Warhead w) { return ((WarheadType)w.Type).Damage; }
/// <summary> /// Apply damage to this armor. The armor takes some damage /// and also mitigates the damage done. /// </summary> /// <param name="w"> /// A <see cref="Warhead"/> /// </param> /// <returns> /// The amount of damage not absorbed by the armor. <see cref="System.Byte"/> /// </returns> public byte applyDamage(Warhead w) { return(((WarheadType)w.Type).Damage); }