private void ExecuteActiveThreat()
 {
     if (WeaponPower.currentWeaponPower >= 2)
     {
         WeaponPower.LowerWeaponPowerBy(2);
     }
 }
Ejemplo n.º 2
0
 public void Damage(WeaponPower weaponPower)
 {
     if (unit.TrySetState(Unit.STATES.DAMAGE))
     {
         unit.AddForce(weaponPower.Force);
     }
 }
        public void ExecuteSuccessEvent()
        {
            var active = Player.PartyActions.ExecutingCharacter;

            Characters.CharacterActions.RaiseCharacterDeterminationBy(1, active);

            WeaponPower.RaiseWeaponPowerBy(1);
        }
Ejemplo n.º 4
0
 public override void UseAbility()
 {
     if (CurrentDetermination >= GetAbilityCosts())
     {
         //Defense Plan
         CharacterActions.LowerCharacterDeterminationBy(GetAbilityCosts(), this);
         WeaponPower.RaiseWeaponPowerBy(1);
     }
 }
Ejemplo n.º 5
0
 public Weapon(string name, int damage, WeaponPower power, int cost, string spriteName)
 {
     this.name = name;
     this.power = power;
     this.damage = damage;
     this.cost = cost;
     this.description = "This " + name + " deals " + damage + " damage.\nIt has " + power + " powers.\nYou can sell it for " + cost + " coins.";
     type = ItemType.Weapon;
     this.spriteName = spriteName;
 }
Ejemplo n.º 6
0
 public Weapon(string name, Texture2D texture, int damage, WeaponPower power, int cost)
     : base(texture)
 {
     this.name = name;
     this.power = power;
     this.damage = damage;
     this.cost = cost;
     this.description = "This " + name + " deals " + damage + " damage.\nIt has " + power + " powers.\nYou can sell it for " + cost + " coins.\nIt is " + equiptstatus;
     type = ItemType.Weapon;
 }
 private void ExecuteFutureThreat()
 {
     if (FoodStorage.GetTotal() < 1)
     {
         var active = Player.PartyActions.ExecutingCharacter;
         Characters.CharacterActions.DamageCharacterBy(1, active);
     }
     else
     {
         FoodStorage.Consume(1);
     }
     WeaponPower.RaiseWeaponPowerBy(1);
 }
Ejemplo n.º 8
0
 // Start is called before the first frame update
 void Start()
 {
     //TODO: Initialize all the other stuff
     Roof.SetStartValue(0);
     Wall.SetStartState(0);
     WeaponPower.SetStartValue(0);
     Fur.SetStartValue(0);
     Wood.SetStartValue(0);
     FoodStorage.SetStartValue(0, 0);
     Moral.SetStartValue();
     TerrainStorage.CreateStorageSpace();
     InventionStorage.CreateStorageSpace();
 }
Ejemplo n.º 9
0
        public void OnCollisionEnter(Collision collision)
        {
            if (collision.collider.tag == "attack")
            {
                Unit        attacker    = collision.collider.gameObject.GetComponentInParent <Unit>();
                WeaponPower weaponPower = collision.collider.gameObject.GetComponentInParent <CombatUnit>().weaponPower;
                Health      health      = GetComponent <Health>();

                if (unit.TrySetState(Unit.STATES.DAMAGE))
                {
                    unit.AddForce(weaponPower.Force);

                    // @TODO: ダメージ計算用のサービスを用意してダメージ計算を行う
                    health.TakeDamage(weaponPower.Power);
                }
            }
        }
Ejemplo n.º 10
0
    private void OnMouseDown()
    {
        var component = GetComponent <Actionphase_CanClick>();

        if (component != null && component.IsClickable)
        {
            if (Charges == 0)
            {
                return;
            }

            WeaponPower.RaiseWeaponPowerBy(1);

            Charges--;
            if (Charges == 1)
            {
                token_1.SetActive(true);
            }
            if (Charges == 0)
            {
                token_2.SetActive(true);
            }
        }
    }
Ejemplo n.º 11
0
 public void Research()
 {
     WeaponPower.RaiseWeaponPowerBy(3);
 }
Ejemplo n.º 12
0
 public void Build()
 {
     WeaponPower.RaiseWeaponPowerBy(1);
 }
Ejemplo n.º 13
0
	// Use this for initialization
	void Start () {
		plScript = FindObjectOfType (typeof(Player)) as Player;
		enScript = FindObjectOfType (typeof(EnemyHurt)) as EnemyHurt;
		wpScript = FindObjectOfType (typeof(WeaponPower)) as WeaponPower;

	}
Ejemplo n.º 14
0
	// Use this for initialization
	void Start () {
		plScript = FindObjectOfType (typeof(PlayerAgain)) as PlayerAgain;
		wp = FindObjectOfType (typeof(WeaponPower)) as WeaponPower;
	}
Ejemplo n.º 15
0
	// Use this for initialization
	void Start () {
		plScript = FindObjectOfType (typeof(PlayerAgain)) as PlayerAgain;
		wp = FindObjectOfType (typeof(WeaponPower)) as WeaponPower;
		enemyHealth = 5;
		//Debug.Log (plScript.swinging);
	}