Beispiel #1
0
 public RoleStats(RoleStats stats)
 {
     this.waiguan = stats.waiguan;
     this.koucai  = stats.koucai;
     this.kangya  = stats.kangya;
     this.caiyi   = stats.caiyi;
     this.jishu   = stats.jishu;
 }
Beispiel #2
0
 public RoleStats(RoleStats stats)
 {
     this.meili   = stats.meili;
     this.koucai  = stats.koucai;
     this.tili    = stats.tili;
     this.fanying = stats.fanying;
     this.jiyi    = stats.jiyi;
 }
Beispiel #3
0
    public void UpdateWords()
    {
        RoleStats rs = rm.GetStats();

        view.FansShow.text    = (int)(rm.Fensi) + "";
        view.meili.text       = (int)(rs.waiguan) + "";
        view.fanying.text     = (int)(rs.caiyi) + "";
        view.tili.text        = (int)(rs.kangya) + "";
        view.jiyi.text        = (int)(rs.jishu) + "";
        view.koucai.text      = (int)(rs.koucai) + "";
        view.moneyValue.text  = (int)(rm.Money) + "";
        view.currentTurn.text = (int)(rm.GetCurrentTurn() + 1) + "";
    }
 /// <summary>
 /// Apply characteristics of Role
 /// Taken from Wikia, last updated: 24th of November 2015
 /// </summary>
 /// <param name="role">The player Role</param>
 void RoleCharacteristics(Role role)
 {
     abilities = new Ability[3];
     if (isLocalPlayer) {
         roleStats = new RoleStats((int)attributes["RESI"], (int)attributes["AGI"], (int)attributes["WIS"]);
         CmdProvideStats(roleStats.maxHealth, roleStats.speed, roleStats.dmgMultiplier, roleStats.dmgReduction, roleStats.sapModifier, roleStats.resilience, roleStats.agility, roleStats.wisdom);
     }
     switch (role) {
         case (Role.Defender):
             //  Taunt (Roar/Growl/WTV) - taunts enemies (locks their target on him for 3 sec) CD:6 sec
             abilities[1] = GetComponent<Taunt>();
             //  Smash (deals 1% of enemy health and stuns 1 sec) - no CD, should take 1sec to fully cast anyway
             abilities[0] = GetComponent<Smash>();
             //  Fortify - temporarily increase health and resilience of the defender with 20% for 10 sec. CD:20sec
             abilities[2] = GetComponent<Fortify>();
             GetComponent<VisualizeTeam>().SetHat(1);
             break;
         case (Role.Attacker):
             //  Boomnana - (yup, same one) deals 80% of current health on enemy target in damage; of no targets are hit it return to the caster and deals 35% of current health damage. CD: 3sec
             abilities[2] = GetComponent<ThrowBoomnana>();
             //  Tail Slap - (yup, same one) deals 2% of current health on enemy target; melee; no CD; 1 sec to "cast"
             abilities[0] = GetComponent<TailSlap>();
             //  Punch Dance - deals a stronger tail slap (3% of current health damage) that if it hits stuns the enemy for 2 sec and it's followed by 2 more tail slaps of 4% and 5% damage*current health. CD:20 sec
             abilities[1] = GetComponent<PunchDance>();
             GetComponent<VisualizeTeam>().SetHat(2);
             break;
         case (Role.Supporter):
             //  Puke - (the old puke, does the same thing) stuns all enemies in range, has about 2 units distance units in range. Channeled 3 sec; CD:5 sec
             abilities[1] = GetComponent<Puke>();
             //  Throw poison - ranged ability, slows the enemy at 0,5*speed and deals 0.5% damage*max health over 3 sec (1.5% in total). Range from 5 to 30 distance units. No CD; takes 1 sec to cast and requires poisonous herbs
             abilities[0] = GetComponent<ThrowPoison>();
             //  Heal force - ability targets only friendly characters. Heals 50-250 HP over 3 sec depending on skill and herbs used in the ability. Max range 20 units. 1 herb heals instantly for 50HP, 2->4 herb heal over time (50 at first and 50 more for each 'tic'). No CD; instant application; requires herbs to cast
             abilities[2] = GetComponent<HealForce>();
             GetComponent<VisualizeTeam>().SetHat(3);
             break;
         default:
             // Instead we should do the freeMode player stuff here
             goto case Role.Attacker;
     }
     gameObject.GetComponent<Rigidbody>().transform.localScale = new Vector3(sizeModifier, sizeModifier, sizeModifier);
     //gameObject.GetComponent<Rigidbody>().transform.localScale *= sizeModifier; // Applies on others
     maxHealth = syncMaxHealth;
     if(health > maxHealth)
         health = maxHealth;
 }
Beispiel #5
0
 override public string ToString()
 {
     return("{Role: " + ID + ", Descriptior: " + Name.ToString() + ", Stats: " + RoleStats.ToString() + "}");
 }