public override void OnEffectStart(Actor akTarget, Actor akCaster) { Me = akTarget; RegisterForActorAction(5); RegisterForActorAction(6); BaseStamina = Me.GetBaseActorValue("stamina"); MeStrength = Me.GetActorValue("RightMobilityCondition"); GhostFaction = Me.IsInFaction(aadpGhostFaction); SteelSwordW = SteelSword.GetWeight(); SteelDaggerW = SteelDagger.GetWeight(); SteelAxeW = SteelAxe.GetWeight(); SteelGreatswordW = SteelGreatsword.GetWeight(); SteelBattleaxeW = SteelBattleaxe.GetWeight(); MessagePercent = aadpMoMessageMin.GetValue(); PlayerWrap = PlayerREF.GetLeveledActorBase().GetName() + " threw a Wrap Shot."; SmashGlobal = aadpTitanSmash.GetValue(); if (Me.HasPerk(deadlybash)) { deadlybashperk = 0.5; } else { deadlybashperk = 1; } MeHasBow = Me.GetEquippedWeapon(false).IsBow(); LogicalWards = (int)aadpLogicalWards.GetValue(); GotoState("NormalState"); }
private void CommandBox_KeyDown(object sender, KeyEventArgs e) { if (e.Key == Key.Enter) { if (_gameSessionViewModel.GameMap.CurrentLocation.Name == "Yin Village" && _gameSessionViewModel.GameMap.CurrentLocation.DefaultWeaponChosen == false) { SteelSword SteelSword = new SteelSword(_gameSessionViewModel, this); Bow Bow = new Bow(_gameSessionViewModel, this); Bow.Name = "Bow"; Staff MagicStaff = new Staff(_gameSessionViewModel, this); MagicStaff.Name = "Magic Staff"; switch (this.CommandBox.Text.ToLower()) { case "/grab sword": TipsBox.Text = "You grab the Sword!"; Location.enableControls(this); CommandBox.Foreground = Brushes.Black; CommandBox.Text = ""; _gameSessionViewModel.GameMap.CurrentLocation.DefaultWeaponChosen = true; _gameSessionViewModel.GameMap.CurrentLocation.ChanceOfFight = true; TipsBox.Text = "You're not strong, venture out and become stronger!"; _gameSessionViewModel.Player.EquippedItems.Add(SteelSword); _gameSessionViewModel.Player.EquippedWeapon = SteelSword; changePlayerClass("Warrior"); playerStatsWindow.PlayerClass.Text = "Warrior"; DialogueBox.Text = "Where should I go now?"; break; case "/grab bow": TipsBox.Text = "You grab the Bow!"; Location.enableControls(this); CommandBox.Foreground = Brushes.Black; CommandBox.Text = ""; _gameSessionViewModel.GameMap.CurrentLocation.DefaultWeaponChosen = true; _gameSessionViewModel.GameMap.CurrentLocation.ChanceOfFight = true; TipsBox.Text = "You're not strong, venture out and become stronger!"; playerStatsWindow.PlayerClass.Text = "Archer"; _gameSessionViewModel.Player.EquippedItems.Add(Bow); _gameSessionViewModel.Player.EquippedWeapon = Bow; changePlayerClass("Archer"); DialogueBox.Text = "Where should I go now?"; break; case "/grab staff": TipsBox.Text = "You grab the Magic Staff!"; Location.enableControls(this); CommandBox.Foreground = Brushes.Black; CommandBox.Text = ""; _gameSessionViewModel.GameMap.CurrentLocation.DefaultWeaponChosen = true; _gameSessionViewModel.GameMap.CurrentLocation.ChanceOfFight = true; TipsBox.Text = "You're not strong, venture out and become stronger!"; _gameSessionViewModel.Player.EquippedItems.Add(MagicStaff); _gameSessionViewModel.Player.EquippedWeapon = MagicStaff; playerStatsWindow.PlayerClass.Text = "Mage"; changePlayerClass("Mage"); DialogueBox.Text = "Where should I go now?"; break; default: CommandBox.Foreground = Brushes.Red; break; } } } }