public float GetEventAndBiomeMultiplier(Globals.energySubTypes subType, Globals.biome bioType) { float test = eventAndBiomeMatrix[(int)subType - 2, (int)bioType]; Debug.Log("test: " + test); return(test); }
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); }
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); } }
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 + "]"); }
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]); }
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]); }
public float GetEventAndHouseMultiplier(Globals.energySubTypes subType) { return(eventAndHouseMatrix[(int)subType - 2]); }
public float[] GetEventAndVillagerMultiplier(Globals.energySubTypes subType) { return(eventAndPeopleMatrix[(int)subType]); }