public BaseCureSpell(string spellName, int die, int sides, int manaCost = -1) { Effect = new RecoverHealth(); Parameter.Dice = GlobalReference.GlobalValues.DefaultValues.ReduceValues(die, sides); SpellName = spellName; SpellName = spellName; if (manaCost == -1) { ManaCost = sides * die / 20; } else { ManaCost = manaCost; } string roomMessage = "{performer} says {0} and their hands begin to glow causing {target} to look better."; string targetMessage = "{performer} says {0} and heals you."; string performerMessage = "You say {0} and heal {target}."; List <ITranslationPair> translate = new List <ITranslationPair>(); ITranslationPair pair = new TranslationPair(Translator.Languages.Magic, spellName); translate.Add(pair); RoomNotificationSuccess = new TranslationMessage(roomMessage, TagType.Info, translate); TargetNotificationSuccess = new TranslationMessage(targetMessage, TagType.Info, translate); PerformerNotificationSuccess = new TranslationMessage(performerMessage, TagType.Info, translate); }
public void Setup() { effect = new RecoverHealth(); pc = new Mock <IPlayerCharacter>(); parameter = new Mock <IEffectParameter>(); dice = new Mock <IDice>(); parameter.Setup(e => e.Dice).Returns(dice.Object); parameter.Setup(e => e.Target).Returns(pc.Object); dice.Setup(e => e.RollDice()).Returns(10); }
public void ResetPlayerWithoutExp() { healthBar.SetMaxValue(maxHealth); pixelsBar.SetMaxValue(maxPixels); expBar.SetMaxValue(expToNextLevel); Health = maxHealth; Pixels = maxPixels; InputEnabled(true); isAlive = true; abilities = new Dictionary <char, Ability>(); abilities['1'] = new RecoverHealth(this); abilities['2'] = new RecoverPixels(this); saveLoadData.GetComponent <DataToSaveLoad>().ResetBaby(); saveLoadData.GetComponent <DataToSaveLoad>().IncreaseMaxEnemiesAttacking(); }