internal void LoadOnce(NaviState naviState) { naviState.ItemRefresh(); naviState.TargetRefresh(); runOnce = true; }
public override void InitializePotentials(NaviState naviState, Main main) { PotentialEnemy tempEnemy; potentialEnemies.Clear(); //Enemies Initialization Begins// tempEnemy = new PotentialEnemy(); tempEnemy.enemy = new Wolfy(main, naviState); tempEnemy.proportion = 5; potentialEnemies.Add(tempEnemy); tempEnemy = new PotentialEnemy(); tempEnemy.enemy = new Wolfy(main, naviState); tempEnemy.proportion = 5; potentialEnemies.Add(tempEnemy); tempEnemy = new PotentialEnemy(); tempEnemy.enemy = new Webber(main, naviState); tempEnemy.proportion = 5; potentialEnemies.Add(tempEnemy); tempEnemy = new PotentialEnemy(); tempEnemy.enemy = new Webber(main, naviState); tempEnemy.proportion = 5; potentialEnemies.Add(tempEnemy); tempEnemy = new PotentialEnemy(); tempEnemy.enemy = new Webber(main, naviState); tempEnemy.proportion = 5; potentialEnemies.Add(tempEnemy); tempEnemy = new PotentialEnemy(); tempEnemy.enemy = new Woody(main, naviState); tempEnemy.proportion = 15; potentialEnemies.Add(tempEnemy); tempEnemy = new PotentialEnemy(); tempEnemy.enemy = new Woody(main, naviState); tempEnemy.proportion = 15; potentialEnemies.Add(tempEnemy); tempEnemy = new PotentialEnemy(); tempEnemy.enemy = new Woody(main, naviState); tempEnemy.proportion = 15; potentialEnemies.Add(tempEnemy); tempEnemy = new PotentialEnemy(); tempEnemy.enemy = new Woody(main, naviState); tempEnemy.proportion = 15; potentialEnemies.Add(tempEnemy); tempEnemy = new PotentialEnemy(); tempEnemy.enemy = new Waxwell(main, naviState); tempEnemy.proportion = 15; potentialEnemies.Add(tempEnemy); }
private void Choice1(NaviState naviState) { SwitchState(1); naviState.pointer.isAlive = true; naviState.pointer.Scale = new Vector2(0.8f, 0.8f); naviState.pointer.RotationAngle = 180; EventButton button; button = new EventButton(); button.frameHeight = 50; button.frameWidth = 150; button.UpperLeft = new Vector2(box.UpperLeft.X + box.frameWidth + 5, box.UpperLeft.Y); button.icon = null; button.display = "Of course"; button.action = Choice1Decision1; button.SetParts(naviState.cornerTexture, naviState.wallTexture, naviState.backTexture); box.buttons.Add(button); button = new EventButton(); button.frameHeight = 50; button.frameWidth = 150; button.UpperLeft = new Vector2(box.UpperLeft.X + box.frameWidth + 5, box.UpperLeft.Y + 55); button.icon = null; button.display = "Fuuuuck no"; button.action = Choice1Decision2; button.SetParts(naviState.cornerTexture, naviState.wallTexture, naviState.backTexture); box.buttons.Add(button); }
public override void Call(GameTime gameTime, NaviState naviState) { if (typingStrings == null) { Initialize(naviState); typingStrings.lines.Add("You wanna foight mate?\n"); typingStrings.lines.Add("\nI'll focken shank ya fam."); typingStrings.lines.Add("Or at least these arseholes will,\n\nI don't have hands."); previousState = 0; state = 0; index = 0; } if (naviState.Type(typingStrings, gameTime, 0.01)) { naviState.pointer.Scale = new Vector2(0.8f, 0.8f); typingStrings = null; typingStrings = new TypingStrings(); typingStrings.lines = new List <string>(); typingStrings.lines.Add("Still no hands."); typingStrings.line = ""; typingStrings.previousLines = ""; naviState.BattleBegin(potentialTroops); } }
internal virtual void Idle(NaviState naviState, GameTime gameTime) { if (naviState.Type(typingStrings, gameTime, 0.01)) { Complete(naviState); } }
internal void Complete(NaviState naviState) { naviState.ActivateState(0); naviState.currentEvent = null; typingStrings = null; }
internal void PointerReset(NaviState naviState) { naviState.pointer.Scale = new Vector2(0.4f, 0.4f); naviState.pointer.UpperLeft = new Vector2((box.frameWidth + box.UpperLeft.X) - naviState.pointer.GetWidth() - 20, (box.frameHeight + box.UpperLeft.Y) - naviState.pointer.GetHeight() - 20); naviState.pointer.RotationAngle = 0; naviState.pointer.isAlive = false; }
internal void Complete(NaviState naviState) { naviState.ActivateState(0); naviState.eventMover = null; naviState.pointer.Scale = new Vector2(0.8f, 0.8f); typingStrings = null; }
public override bool Call(GameTime gameTime, NaviState naviState) { naviState.state[1] = false; naviState.previousState[1] = false; naviState.actor = naviState.target; naviState.SkillsMenuSwitch(); return(true); }
private void Choice2Decision2(NaviState naviState, GameTime gameTime) { naviState.pointer.RotationAngle = 0; naviState.pointer.Scale = new Vector2(0.8f, 0.8f); naviState.pointer.isAlive = false; InitializeBoxes(naviState); SellRefresh(naviState); SwitchState(3); }
private void Choice2Decision3(NaviState naviState, GameTime gameTime) { SwitchState(0); PointerReset(naviState); typingStrings.lines.Clear(); typingStrings.lines.Add("Be seeing you."); typingStrings.line = ""; typingStrings.previousLines = ""; box.buttons.Clear(); }
public override bool Call(GameTime gameTime, NaviState naviState) { if (!runOnce) { if (box == null) { box = new Box(); box.frameWidth = 800; box.frameHeight = 200; box.UpperLeft = new Vector2(560, 880); box.SetParts(naviState.cornerTexture, naviState.wallTexture, naviState.backTexture); display = naviState.target.name + " recovered\n100 Halcyon... Points?\nThat doesn't sound right..."; } naviState.target.health += 100; if (naviState.target.health > naviState.target.maxHealth) { naviState.target.health = naviState.target.maxHealth; } Consume(naviState); naviState.pointer.Scale = new Vector2(0.4f, 0.4f); naviState.pointer.UpperLeft = new Vector2((box.frameWidth + box.UpperLeft.X) - naviState.pointer.GetWidth() - 20, (box.frameHeight + box.UpperLeft.Y) - naviState.pointer.GetHeight() - 20); naviState.pointer.isAlive = true; LoadOnce(naviState); runOnce = true; } if (naviState.activateInput.inputState == Input.inputStates.pressed) { naviState.pointer.Scale = new Vector2(0.8f, 0.8f); naviState.pointer.isAlive = false; box = null; runOnce = false; Complete(naviState); return(true); } return(false); }
public override bool Call(GameTime gameTime, NaviState naviState) { if (!runOnce) { if (box == null) { box = new Box(); box.frameWidth = 800; box.frameHeight = 200; box.UpperLeft = new Vector2(560, 880); box.SetParts(naviState.cornerTexture, naviState.wallTexture, naviState.backTexture); display = naviState.actor.name + " healed\n" + naviState.target.name + "\nby 250 HP!\n\n\n...It looked kinda pretty, too."; } naviState.target.health += 250; if (naviState.target.health > naviState.target.maxHealth) { naviState.target.health = naviState.target.maxHealth; } naviState.actor.mana -= cost; naviState.pointer.Scale = new Vector2(0.4f, 0.4f); naviState.pointer.UpperLeft = new Vector2((box.frameWidth + box.UpperLeft.X) - naviState.pointer.GetWidth() - 20, (box.frameHeight + box.UpperLeft.Y) - naviState.pointer.GetHeight() - 20); naviState.pointer.isAlive = true; LoadOnce(naviState); runOnce = true; } if (naviState.activateInput.inputState == Input.inputStates.pressed) { naviState.pointer.Scale = new Vector2(0.8f, 0.8f); naviState.pointer.isAlive = false; box = null; runOnce = false; Complete(naviState, gameTime); return(true); } return(false); }
private void Choice1Decision1(NaviState naviState, GameTime gameTime) { SwitchState(0); PointerReset(naviState); typingStrings.lines.Clear(); typingStrings.lines.Add("It's as if neither of you have seen what Shantae looks like\nin ages, so I'll reiterate.\n\n"); typingStrings.lines.Add("WE LOOK NOTHING ALIKE, the hair is all wrong,\nthe colour should make that clear enough."); typingStrings.lines.Add("So? What did you want?"); typingStrings.line = ""; typingStrings.previousLines = ""; box.buttons.Clear(); }
private void Choice1Decision2(NaviState naviState, GameTime gameTime) { SwitchState(0); PointerReset(naviState); typingStrings.lines.Clear(); typingStrings.lines.Add("THANK you, he's been calling me 'Shanty' all week,\nit's the worst.\n\n"); typingStrings.lines.Add("Maybe you could convince him to google it, so that he isn't\nalways comparing me to her like a total dumbass?"); typingStrings.lines.Add("Well, whatever. How can I help you?"); typingStrings.line = ""; typingStrings.previousLines = ""; box.buttons.Clear(); }
public Windfury(Main main, NaviState naviState) { potentialDrops = new List <PotentialDrops>(); potentialDrops.Add(new PotentialDrops()); potentialDrops[0].item = main.heldItems[3]; potentialDrops[0].proportion = 55; potentialDrops[0].potentialCounts.Add(new PotentialCount()); potentialDrops[0].potentialCounts[0].count = 25; potentialDrops[0].potentialCounts[0].proportion = 75; potentialDrops[0].potentialCounts.Add(new PotentialCount()); potentialDrops[0].potentialCounts[1].count = 50; potentialDrops[0].potentialCounts[1].proportion = 25; potentialDrops.Add(new PotentialDrops()); potentialDrops[1].item = main.heldItems[0]; potentialDrops[1].proportion = 15; potentialDrops[1].potentialCounts.Add(new PotentialCount()); potentialDrops[1].potentialCounts[0].count = 99; potentialDrops[1].potentialCounts[0].proportion = 100; potentialDrops.Add(new PotentialDrops()); potentialDrops[2].item = main.heldItems[1]; potentialDrops[2].proportion = 15; potentialDrops[2].potentialCounts.Add(new PotentialCount()); potentialDrops[2].potentialCounts[0].count = 50; potentialDrops[2].potentialCounts[0].proportion = 100; potentialDrops.Add(new PotentialDrops()); potentialDrops[3].item = main.heldItems[2]; potentialDrops[3].proportion = 15; potentialDrops[3].potentialCounts.Add(new PotentialCount()); potentialDrops[3].potentialCounts[0].count = 25; potentialDrops[3].potentialCounts[0].proportion = 100; name = "Windfury, Failed Experiment of Pocketry"; SetTexture(naviState.werewolfTexture); Scale = new Vector2(0.01f, 0.01f); maxHealth = 1; health = 1; PhAtk = 1; PhDef = 0; speed = 1000; Acc = 100; Eva = 0; friendly = false; goldYield = 1000; XPYield = 250; }
private void Choice2(NaviState naviState) { SwitchState(1); naviState.pointer.Scale = new Vector2(0.8f, 0.8f); naviState.pointer.RotationAngle = 180; box.buttons.Clear(); EventButton button; button = new EventButton(); button.frameHeight = 50; button.frameWidth = 100; button.UpperLeft = new Vector2(box.UpperLeft.X + box.frameWidth + 5, box.UpperLeft.Y); button.icon = null; button.display = "Buy"; button.action = Choice2Decision1; button.SetParts(naviState.cornerTexture, naviState.wallTexture, naviState.backTexture); box.buttons.Add(button); button = new EventButton(); button.frameHeight = 50; button.frameWidth = 100; button.UpperLeft = new Vector2(box.UpperLeft.X + box.frameWidth + 5, box.UpperLeft.Y + 55); button.icon = null; button.display = "Sell"; button.action = Choice2Decision2; button.SetParts(naviState.cornerTexture, naviState.wallTexture, naviState.backTexture); box.buttons.Add(button); button = new EventButton(); button.frameHeight = 50; button.frameWidth = 100; button.UpperLeft = new Vector2(box.UpperLeft.X + box.frameWidth + 5, box.UpperLeft.Y + 110); button.icon = null; button.display = "Leave"; button.action = Choice2Decision3; button.SetParts(naviState.cornerTexture, naviState.wallTexture, naviState.backTexture); box.buttons.Add(button); }
internal void Complete(NaviState naviState, GameTime gameTime) { Ability temp = (Ability)naviState.currentAction; if (naviState.actor.mana < temp.cost) { naviState.SkillsRefresh(); naviState.currentAction = new SkillsMenuSwitcher(); naviState.currentState = 4; } else { naviState.TargetRefresh(); naviState.currentState = 6; } naviState.state[1] = false; naviState.previousState[1] = false; runOnce = false; }
public override bool Call(GameTime gameTime, NaviState naviState) { Random rand = new Random(); if (rand.Next(1, 101) <= 10 + naviState.encounterRate) { naviState.BattleBegin(potentialEnemies); naviState.encounterRate = 0; } else { naviState.encounterRate += 4; naviState.Movement(); } Complete(naviState); return(true); }
public override void Call(GameTime gameTime, NaviState naviState) { if (typingStrings == null) { Initialize(naviState); InitializeItems(naviState); //typingStrings.lines.Add("I'm supposed to be a shopkeeper.\n\n"); //typingStrings.lines.Add("But really, I'm only here because Nye\nthinks I look weirdly like Shantae."); //typingStrings.lines.Add("What do you think? Do you agree with him?"); typingStrings.lines.Add("What can I do for you?"); previousState = 0; state = 0; index = 0; } if (state == 0) { Idle(naviState, gameTime); } else if (state == 1) { ChoiceMenu(naviState, gameTime); } else if (state == 2) { BuyMenu(naviState); } else if (state == 3) { SellMenu(naviState); } else if (state == 4) { ConfirmMenu(naviState, gameTime); } }
public virtual void Call(GameTime gameTime, NaviState naviState) { if (typingStrings == null) { typingStrings = new TypingStrings(); typingStrings.lines = new List <string>(); typingStrings.lines.Add(""); typingStrings.line = ""; typingStrings.previousLines = ""; if (naviState.heroMover.gridPosition == new Vector2(gridPosition.X, gridPosition.Y + 1)) { setCurrentFrame(1, 0); } else if (naviState.heroMover.gridPosition == new Vector2(gridPosition.X - 1, gridPosition.Y)) { setCurrentFrame(1, 1); } else if (naviState.heroMover.gridPosition == new Vector2(gridPosition.X + 1, gridPosition.Y)) { setCurrentFrame(1, 2); } else if (naviState.heroMover.gridPosition == new Vector2(gridPosition.X, gridPosition.Y - 1)) { setCurrentFrame(1, 3); } previousState = 0; state = 0; } if (state == 0) { Idle(naviState, gameTime); } else if (state == 1) { ChoiceMenu(naviState, gameTime); } }
public Woody(Main main, NaviState naviState) { potentialDrops = new List <PotentialDrops>(); potentialDrops.Add(new PotentialDrops()); potentialDrops[0].item = main.heldItems[3]; potentialDrops[0].proportion = 50; potentialDrops[0].potentialCounts.Add(new PotentialCount()); potentialDrops[0].potentialCounts[0].count = 1; potentialDrops[0].potentialCounts[0].proportion = 75; potentialDrops[0].potentialCounts.Add(new PotentialCount()); potentialDrops[0].potentialCounts[1].count = 2; potentialDrops[0].potentialCounts[1].proportion = 25; potentialDrops.Add(new PotentialDrops()); potentialDrops[1].item = main.heldItems[0]; potentialDrops[1].proportion = 15; potentialDrops[1].potentialCounts.Add(new PotentialCount()); potentialDrops[1].potentialCounts[0].count = 1; potentialDrops[1].potentialCounts[0].proportion = 95; potentialDrops[1].potentialCounts.Add(new PotentialCount()); potentialDrops[1].potentialCounts[1].count = 5; potentialDrops[1].potentialCounts[1].proportion = 5; name = "Woody"; SetTexture(naviState.werewolfTexture); Scale = new Vector2(0.1f, 0.1f); maxHealth = 3; health = 3; healthDeviance = 50; PhAtk = 2; PhDef = 0; speed = 49; speedDeviance = 25; Acc = 100; Eva = 0; friendly = false; goldYield = 50; XPYield = 15; }
internal void Complete(NaviState naviState) { int tempButtons = naviState.inventoryBox.buttons.Count; int tempItems = naviState.allItems.Count; if (heldCount == 0) { naviState.ItemRefresh(); naviState.currentState = 3; naviState.currentAction = null; } else { naviState.TargetRefresh(); naviState.currentState = 6; } naviState.state[1] = false; naviState.previousState[1] = false; runOnce = false; }
internal virtual void ChoiceMenu(NaviState naviState, GameTime gameTime) { List <SpriteBase> tempList = new List <SpriteBase>(); for (int i = 0; i < box.buttons.Count; i++) { tempList.Add(box.buttons[i]); } MenuUpdateReturn temp = naviState.MenuUpdate(tempList, index); index = temp.index; naviState.pointer.UpperLeft = new Vector2(box.buttons[index].UpperLeft.X + box.buttons[index].frameWidth + 15, box.buttons[index].UpperLeft.Y + 5); naviState.pointer.isAlive = true; if (temp.activate) { EventButton tempButton = (EventButton)box.buttons[index]; tempButton.action.Invoke(naviState, gameTime); } }
internal void Initialize(NaviState naviState) { box = new Box(); box.frameWidth = 800; box.frameHeight = 200; box.UpperLeft = new Vector2(560, 880); box.buttons = new List <Button>(); box.SetParts(naviState.cornerTexture, naviState.wallTexture, naviState.backTexture); allBoxes.Add(box); PointerReset(naviState); typingStrings = new TypingStrings(); typingStrings.lines = new List <string>(); typingStrings.line = ""; typingStrings.previousLines = ""; if (naviState.heroMover.gridPosition == new Vector2(gridPosition.X, gridPosition.Y + 1)) { setCurrentFrame(1, 0); } else if (naviState.heroMover.gridPosition == new Vector2(gridPosition.X - 1, gridPosition.Y)) { setCurrentFrame(1, 1); } else if (naviState.heroMover.gridPosition == new Vector2(gridPosition.X + 1, gridPosition.Y)) { setCurrentFrame(1, 2); } else if (naviState.heroMover.gridPosition == new Vector2(gridPosition.X, gridPosition.Y - 1)) { setCurrentFrame(1, 3); } }
public override bool Call(GameTime gameTime, NaviState naviState) { if (typingStrings == null) { naviState.currentEvent = this; eventBox = new Box(); eventBox.frameWidth = 800; eventBox.frameHeight = 200; eventBox.UpperLeft = new Vector2(560, 880); eventBox.SetParts(naviState.cornerTexture, naviState.wallTexture, naviState.backTexture); naviState.pointer.Scale = new Vector2(0.4f, 0.4f); naviState.pointer.UpperLeft = new Vector2((eventBox.frameWidth + eventBox.UpperLeft.X) - naviState.pointer.GetWidth() - 20, (eventBox.frameHeight + eventBox.UpperLeft.Y) - naviState.pointer.GetHeight() - 20); naviState.pointer.isAlive = false; typingStrings = new TypingStrings(); typingStrings.lines = new List <string>(); typingStrings.lines.Add("This is, well. I'm not sure what it is, quite.\n"); typingStrings.lines.Add("Maybe some sort of altar? I've seen stranger."); typingStrings.line = ""; typingStrings.previousLines = ""; } if (naviState.Type(typingStrings, gameTime, 0.01)) { Complete(naviState); return(true); } return(false); }
internal override void Idle(NaviState naviState, GameTime gameTime) { if (typingStrings.line == "What do you think? Do you agree with him?") { Choice1(naviState); } else if (typingStrings.line == "So? What do you want?" || typingStrings.line == "Well, whatever. How can I help you?" || typingStrings.line == "What can I do for you?") { Choice2(naviState); } else { if (naviState.Type(typingStrings, gameTime, 0.01)) { Complete(naviState); typingStrings = new TypingStrings(); typingStrings.lines = new List <string>(); typingStrings.lines.Add("What can I do for you?"); typingStrings.line = ""; typingStrings.previousLines = ""; } } }
public override void InitializeTroops(NaviState naviState, Main main) { Enemy tempEnemy; Troop troop; potentialTroops.Clear(); troop = new Troop(); tempEnemy = new Wolfy(main, naviState); troop.enemies.Add(tempEnemy); tempEnemy = new Webber(main, naviState); troop.enemies.Add(tempEnemy); tempEnemy = new Woody(main, naviState); troop.enemies.Add(tempEnemy); tempEnemy = new Waxwell(main, naviState); troop.enemies.Add(tempEnemy); troop.proportion = 50; potentialTroops.Add(troop); troop = new Troop(); tempEnemy = new Webber(main, naviState); troop.enemies.Add(tempEnemy); tempEnemy = new Webber(main, naviState); troop.enemies.Add(tempEnemy); tempEnemy = new Waxwell(main, naviState); troop.enemies.Add(tempEnemy); tempEnemy = new Waxwell(main, naviState); troop.enemies.Add(tempEnemy); troop.proportion = 25; potentialTroops.Add(troop); troop = new Troop(); tempEnemy = new Woody(main, naviState); troop.enemies.Add(tempEnemy); tempEnemy = new Woody(main, naviState); troop.enemies.Add(tempEnemy); tempEnemy = new Woody(main, naviState); troop.enemies.Add(tempEnemy); tempEnemy = new Woody(main, naviState); troop.enemies.Add(tempEnemy); troop.proportion = 15; potentialTroops.Add(troop); troop = new Troop(); tempEnemy = new Wolfy(main, naviState); troop.enemies.Add(tempEnemy); tempEnemy = new Webber(main, naviState); troop.enemies.Add(tempEnemy); tempEnemy = new Wolfy(main, naviState); troop.enemies.Add(tempEnemy); tempEnemy = new Webber(main, naviState); troop.enemies.Add(tempEnemy); troop.proportion = 9; potentialTroops.Add(troop); troop = new Troop(); tempEnemy = new Windfury(main, naviState); troop.enemies.Add(tempEnemy); troop.proportion = 1; potentialTroops.Add(troop); }
public virtual void InitializePotentials(NaviState naviState, Main main) { }
public virtual void InitializeTroops(NaviState naviState, Main main) { }