コード例 #1
0
    public override void Perform(CombatMap map, Point trigger)
    {
        owner.Energy(-cost);
        //owner.Armor(value);
        UnitPiece target = map.unitManager.GetUnit(trigger);

        if (target != null)
        {
            target.Effect(attribute, Random.Range(value, maxValue + 1));
        }
    }
コード例 #2
0
 public void EndTurn()
 {
     if (selectedUnit != null)
     {
         initiativeOrder.Remove(selectedUnit);
         initiativeOrder.Add(selectedUnit);
         selectedUnit.EndTurn();
         if (!actionPerformed)
         {
             selectedUnit.Effect(Attribute.Energy, 1);
         }
         selectedUnit = null;
     }
     hasMoved        = false;
     actionPerformed = false;
 }
コード例 #3
0
 public virtual void Tick(Trigger trigger)
 {
     foreach (PassiveEffect pe in effects)
     {
         if (trigger == pe.trigger)
         {
             if (ownerPiece != null)
             {
                 Debug.Log(passiveName + " pieceTick " + trigger + " to " + owner.unitName);
                 ownerPiece.Effect(pe.attribute, pe.value);
             }
             else
             {
                 owner.ModifyAttribute(pe.attribute, pe.value);
             }
         }
     }
 }