public void IsInfected() { // You are infected: [ %str% ]. string infection = text.GetStringData(node, "PCInfect"); GetComponent <Infection>().HasInfection(out InfectionTag tag, out _); string name = data.GetInfectionName(tag); infection = infection.Replace("%str%", name); infection = color.GetColorfulText(infection, ColorName.Orange); message.StoreText(infection); }
public void DefeatTarget(GameObject target) { SubObjectTag tag = target.GetComponent <MetaInfo>().SubTag; int potion = actorData.GetIntData(tag, DataTag.Potion); int bonusPotion = target.GetComponent <Infection>().HasInfection( InfectionTag.Mutated) ? potionData.BonusPotion : 0; string victory; GetComponent <Potion>().GainPotion(potion + bonusPotion); progress.CountKill(target); if (progress.IsWin()) { BurySelf(); color.ChangeObjectColor(getActor(SubObjectTag.Guide), ColorName.Orange); if (progressData.IsRushMode) { victory = text.GetStringData(node, "WinRush"); } else { victory = text.GetStringData(node, "WinNormal"); } victory = color.GetColorfulText(victory, ColorName.Green); message.StoreText(victory); modeline.PrintStaticText(text.GetStringData(node, "ReloadWin")); } else if (progress.LevelCleared()) { BurySelf(); color.ChangeObjectColor(getActor(SubObjectTag.Guide), ColorName.Orange); victory = text.GetStringData(node, "Level"); victory = color.GetColorfulText(victory, ColorName.Green); message.StoreText(victory); modeline.PrintStaticText(text.GetStringData(node, "Continue")); } }
public void IsInfected() { // %str1% is infected: [ %str2% ]. string infection = text.GetStringData(node, "NPCInfect"); GetComponent <Infection>().HasInfection(out InfectionTag tag, out _); string name = data.GetInfectionName(tag); infection = infection.Replace("%str1%", GetDefenderName()); infection = infection.Replace("%str2%", name); infection = color.GetColorfulText(infection, ColorName.Green); message.StoreText(infection); }
public void DrinkPotion() { if (CurrentPotion < 1) { return; } int hp = GetComponent <Infection>().HasInfection(InfectionTag.Mutated) ? potionData.MutatedHP : potionData.RestoreHP; GetComponent <HP>().GainHP(hp); GetComponent <Infection>().ResetInfection(); GetComponent <Stress>().LoseStress(potionData.RelieveStress); GetComponent <Energy>().GainEnergy(potionData.RestoreEnergy); LosePotion(1); string drink = text.GetStringData(node, "Potion"); drink = color.GetColorfulText(drink, ColorName.Orange); message.StoreText(drink); return; }