Esempio n. 1
0
    public override void InitStats()
    {
        AttackData = new AttackData(8);

        // Main
        Main_Shoot_CD.EndTime         = new FloatStat(0.15f, min: 0.01f);
        Main_Reload_Dur.EndTime       = new FloatStat(0.5f, min: 0.01f);
        Main_SwapMagazine_Dur.EndTime = new FloatStat(0.8f, min: 0.01f);
        Main_MagazineSize             = new IntStat(6, min: 0);
        Main_BulletData = new ProjectileData()
        {
            moveSpeed  = new FloatStat(45f, min: 0f),
            travelDist = new FloatStat(0f, min: 0f, max: 10f)
        };

        // Upgrade
        switch (ItemLevel)
        {
        case 1: break;

        case 2:
            AttackData = new AttackData(10);
            break;

        default:
            AttackData = new AttackData(12);
            break;
        }
    }
Esempio n. 2
0
    public override void InitStats()
    {
        AttackData = new AttackData(15);

        // Main: Cooldown
        Main_CD.EndTime = new FloatStat(0.7f, min: 0.01f);
        // Main: Mana Usage
        Main_ManaUsage = new FloatStat(4f, min: 0);
        // Main: Ice Bolt
        Main_IceBoltData = new ProjectileData()
        {
            moveSpeed  = new FloatStat(25f, min: 0f),
            travelDist = new FloatStat(0f, min: 0f, max: 10f)
        };

        // Sub: Cast Time
        Sub_CastTime.EndTime = new FloatStat(0.2f, min: 0f);
        // Sub: Damage
        Sub_DamageTick.EndTime = new FloatStat(0.5f, min: 0f);
        Sub_DamagePerTick      = new AttackData(2f, gameObject);
        // Sub: Mana Usage
        Sub_ManaUsageTick.EndTime = new FloatStat(0.25f, min: 0f);
        Sub_ManaUsagePerTick      = new FloatStat(0.5f, min: 0f);

        // Special: Cast Time
        Spec_CastTime.EndTime = new FloatStat(0.15f, min: 0f);
        // Special: Frozen Soul Usage
        Spec_FrozenSoulUsage = new IntStat(5, min: 0);
        // Special: Ice Block
        Spec_IceBlockDur.EndTime = new FloatStat(5f, min: 0f);
    }
 public ProjectileTemplate(string name, string spriteName, FloatStat damageRatio, IntStat bounces, FloatStat lifespan, FloatStat speed)
 {
     _name = name;
     _spriteName = spriteName;
     _damageRatio = damageRatio;
     _bounces = bounces;
     _lifespan = lifespan;
     _speed = speed;
     _behaviors = new Dictionary<string, List<ProjectileBehavior>>();
 }
Esempio n. 4
0
    public void Setup(PlayerStats pStats)
    {
        System.Array.Copy(pStats.upgrades, upgrades, GlobalVariables.visibleTraitCount);
        charClass = pStats.characterClass;

        maxHealth = new IntStat(pStats.characterClass.maxHealth);
        for (int x = 0; x < pStats.upgrades[(int)PlayerStats.UpgradeIndex.Health]; x++)
        {
            maxHealth.AddModifier(GlobalVariables.healthPerUpgrade);
        }
        currentHealth = maxHealth.GetStat();
        healthBar.SetMaxHealth(maxHealth.GetStat());

        attackPower = new IntStat(pStats.characterClass.attackPower);
        for (int x = 0; x < pStats.upgrades[(int)PlayerStats.UpgradeIndex.AttackPower]; x++)
        {
            attackPower.AddModifier(GlobalVariables.attackPerUpgrade);
        }

        magicPower = new IntStat(pStats.characterClass.magicPower);
        for (int x = 0; x < pStats.upgrades[(int)PlayerStats.UpgradeIndex.MagicPower]; x++)
        {
            magicPower.AddModifier(GlobalVariables.magicPerUpgrade);
        }

        resistance = new FloatStat(pStats.characterClass.resistance);
        for (int x = 0; x < pStats.upgrades[(int)PlayerStats.UpgradeIndex.Resistance]; x++)
        {
            resistance.AddModifier(GlobalVariables.resistancePerUpgrade);
        }

        moveSpeed = new IntStat(pStats.characterClass.movespeed);
        for (int x = 0; x < pStats.upgrades[(int)PlayerStats.UpgradeIndex.Movespeed]; x++)
        {
            moveSpeed.AddModifier(GlobalVariables.movePerUpgrade);
        }

        knockbackAmplification = new IntStat(pStats.characterClass.knockbackApplication);
        knockbackResistance    = new FloatStat(pStats.characterClass.knockbackResistance);
        jumpHeight             = new IntStat(pStats.characterClass.jumpHeight);
        doubleJumps            = new IntStat(pStats.characterClass.doubleJumps);
        dashCooldown           = new IntStat(pStats.characterClass.dashCooldown);
        dodgeChance            = new FloatStat(pStats.characterClass.dodgeChance);

/* throws an error
 *              for(int x = 0; x < GlobalVariables.trinketSlots; x++)
 *              {
 *                      foreach(StatModifier statMod in ((Trinket)pStats.equippedItems[x + GlobalVariables.weaponSlots]).modifiers)
 *                      {
 *                              ApplyModifier(statMod.stat, statMod.percent, statMod.amount);
 *                      }
 *              }
 */
        UpdateStatText();
    }
Esempio n. 5
0
    public override void InitStats()
    {
        AttackData = new AttackData(15);

        // Main
        Main_Shoot_CD.EndTime         = new FloatStat(0.1f, min: 0.01f);
        Main_Reload_Dur.EndTime       = new FloatStat(0.12f, min: 0.01f);
        Main_SwapMagazine_Dur.EndTime = new FloatStat(1f, min: 0.01f);
        Main_MagazineSize             = new IntStat(2, min: 0);
        Main_BulletData = new ProjectileData()
        {
            moveSpeed  = new FloatStat(45f, min: 0f),
            travelDist = new FloatStat(0f, min: 0f, max: 7f)
        };
    }
Esempio n. 6
0
 public virtual void Show(IntStat intStat)
 {
     Show(intStat.Type, intStat.Value);
 }