Beispiel #1
0
    //For convenience, allow a constructor that just accepts a number, rather than a function
    public Damage(Chr _chrSource, Chr _chrTarget, int _nBaseDamage, bool _bPiercing = false)
    {
        //Copy the fields as they've been passed in
        GetBase = (Chr __chrSource, Chr __chrTarget) => _nBaseDamage;

        bPiercing = _bPiercing;

        //Store the chrSource and apply its power buff
        SetChrSource(_chrSource);
        SetChrTarget(_chrTarget);
    }
Beispiel #2
0
    public Damage(Damage dmgToCopy)
    {
        //Copy over all the attributes of the original Damage instance
        chrSource = dmgToCopy.chrSource;
        chrTarget = dmgToCopy.chrTarget;

        GetBase = dmgToCopy.GetBase;

        bPiercing = dmgToCopy.bPiercing;

        //Copy the Power fetch method too
        GetPower = dmgToCopy.GetPower;
    }
Beispiel #3
0
 public void SetBase(FuncBaseDamage _GetBase)
 {
     GetBase = _GetBase;
 }