Exemplo n.º 1
0
    public float _getSignalSize(unitStats s)
    {
        float size = 0.5f;


        float distance_bonus = 0f;

        if (s.toy_id.toy_type == ToyType.Temporary)
        {
            distance_bonus = StaticRune.GetDistanceBonus(s.name, islands[island_selected].transform.position, null);
        }
        if (s.toy_id.rune_type == RuneType.SensibleCity)
        {
            return(0.5f);
        }
        if (s != null)
        {
            size = StaticRune.time_bonus_aff(StaticStat.getBaseFactor(s.toy_id.rune_type, EffectType.Range, s.toy_id.toy_type == ToyType.Hero),
                                             EffectType.Range, s.toy_id.rune_type, s.toy_id.toy_type, distance_bonus) / 2f;
        }

        //   Debug.Log("Getting signal size for " + selected + " got " + size + "\n");

        return(size);
    }
Exemplo n.º 2
0
    public float get(EffectType type)
    {
        int i = getStatID(type);


        if (i != -1 && stats[i].active)
        {
            return(StaticRune.time_bonus_aff(stats[i].get(), type, runetype, toy_type, distance_bonus));
        }
        return(0);
    }