Ejemplo n.º 1
0
    public float GetEventAndBiomeMultiplier(Globals.energySubTypes subType, Globals.biome bioType)
    {
        float test = eventAndBiomeMatrix[(int)subType - 2, (int)bioType];

        Debug.Log("test: " + test);
        return(test);
    }
Ejemplo n.º 2
0
    public void InteractWithEvent(Globals.energySubTypes est, float power)
    {
        float effectMultiplier = EventEffectsMatrix.Instance.GetEventAndBiomeMultiplier(est, bioType);

        Debug.Log("Biome going to take: " + (power * effectMultiplier) + "dmg");
        GameObject.FindObjectOfType <VillageCenter>().BiomeModHp((int)bioType, power * effectMultiplier);
    }
Ejemplo n.º 3
0
 public void InteractWithEvent(Globals.energySubTypes est, float power)
 {
     hp += EventEffectsMatrix.Instance.GetEventAndHouseMultiplier(est);
     Globals.limit(ref hp, 0, 1);
     if (hp == 0)
     {
         GameObject.FindObjectOfType <VillageCenter>().DestroyHouse(transform.position);
         GameObject.FindObjectOfType <VillageCenter>().TheListener.RecordStringWithCountNumber(" houses have been destroyed.");
         GameObject.Destroy(this.gameObject);
     }
 }
Ejemplo n.º 4
0
    public void InteractWithEvent(Globals.energySubTypes eventType, float power)
    {
        float[] multiplier = EventEffectsMatrix.Instance.GetEventAndVillagerMultiplier(eventType);
        hp          += power * multiplier[0] * Globals.worldDamageReduction;
        happiness   += power * multiplier[1] * Globals.worldDamageReduction;
        healthiness += power * multiplier[2] * Globals.worldDamageReduction;
        Globals.limit(ref hp, 0, 1);
        Globals.limit(ref happiness, 0, 1);
        Globals.limit(ref healthiness, 0, 1);
        CheckSickness();
        //Debug.Log("Villager interacted with " + eventType + " event, [hp,hapiness,healthiness] = [ " + hp + "," + happiness + "," + healthiness + "]");

        //Debug.Log("Villager interacted with " + eventType + " event, [hp,hapiness,healthiness] = [ " + hp + "," + happiness + "," + healthiness + "]");
    }
Ejemplo n.º 5
0
    public string retMainDescriptors(Globals.energySubTypes type, float power)
    {
        int intType = (int)type;

        power = Mathf.Abs(power);
        if (power > 20)
        {
            power = 0;
        }
        else
        {
            power = 1;
        }
        return(mainDescriptors[intType][(int)power]);
    }
Ejemplo n.º 6
0
    public string retSecondaryDescriptors(Globals.energySubTypes type, float power)
    {
        int intType = (int)type;

        power = Mathf.Abs(power);
        if (power > 20)
        {
            power = 0;
        }
        else if (power > 10)
        {
            power = 1;
        }
        else
        {
            power = 2;
        }
        return(secondaryAdjectives[intType][(int)power]);
    }
Ejemplo n.º 7
0
 public float GetEventAndHouseMultiplier(Globals.energySubTypes subType)
 {
     return(eventAndHouseMatrix[(int)subType - 2]);
 }
Ejemplo n.º 8
0
 public float[] GetEventAndVillagerMultiplier(Globals.energySubTypes subType)
 {
     return(eventAndPeopleMatrix[(int)subType]);
 }