public override TimedMethod[] Use() { Party.GetPlayer().GainAccuracy(5); Party.AddItem(this); return(new TimedMethod[] { new TimedMethod(0, "Audio", new object[] { "Wikipedia" }), new TimedMethod(60, "Log", new object[] { "Accuracy was increased" }), new TimedMethod(0, "CharLogSprite", new object[] { "5", Party.playerSlot - 1, "accuracy", true }) }); }
public override TimedMethod[] Use() { Party.AddItem(new Heels(uses - 1)); Attacks.SetAudio("Knife", 6); return(new TimedMethod[] { new TimedMethod(0, "Audio", new object[] { "Small Swing" }), new TimedMethod(0, "StagnantAttack", new object[] { true, Party.GetPlayer().GetStrength(), Party.GetPlayer().GetStrength() + 5, Party.GetPlayer().GetAccuracy(), true, true, true }) }); }
public override TimedMethod[] UseSelected(int i) { Party.AddItem(new Flask()); Party.members[i].GainDexterity(1); return(new TimedMethod[] { new TimedMethod(0, "Audio", new object[] { "Drink" }), new TimedMethod(60, "Log", new object[] { Party.members[i].GetName() + " Got faster!" }), new TimedMethod(0, "CharLogSprite", new object[] { "1", i, "dexterity", true }) }); }
public override TimedMethod[] UseSelected(int i) { Party.AddItem(new Flask()); Party.members[i].SetBaseAccuracy(Party.members[i].GetBaseAccuracy() + 1); return(new TimedMethod[] { new TimedMethod(0, "Audio", new object[] { "Drink" }), new TimedMethod(60, "Log", new object[] { Party.members[i].GetName() + " Got more focused!" }), new TimedMethod(0, "CharLogSprite", new object[] { "1", i, "accuracy", true }) }); }
public override void UseOutOfCombat(int index) { if (Party.members[index].GetPassive().GetName() == "Performance") { Party.members[index].SetPassive(new Directive(Party.members[index])); } else { Party.AddItem(this); } }
public override TimedMethod[] Use() { if (Attacks.EvasionCheck(Party.GetEnemy(), Party.GetPlayer().GetAccuracy())) { Party.AddItem(this); } Attacks.SetAudio("Blunt Hit", 20); return(new TimedMethod[] { new TimedMethod(0, "Audio", new object[] { "Big Swing" }), new TimedMethod(0, "StagnantAttack", new object[] { true, Party.GetPlayer().GetStrength() + 4, Party.GetPlayer().GetStrength() + 4, Party.GetPlayer().GetAccuracy(), true, true, false }) }); }
public override TimedMethod[] Use() { Party.AddItem(new Flask()); if (Attacks.EvasionCycle(Party.GetPlayer(), Party.GetEnemy())) { TimedMethod[] poisonPart = Party.GetEnemy().status.Poison(2); return(new TimedMethod[] { new TimedMethod(0, "Audio", new object[] { "Clean" }), new TimedMethod(0, "AudioAfter", new object[] { "Acid", 10 }), poisonPart[0], poisonPart[1] }); } else { return(new TimedMethod[] { new TimedMethod(0, "Audio", new object[] { "Clean" }), new TimedMethod(60, "Log", new object[] { "miss" }) }); } }
public override TimedMethod[] Use() { Party.AddItem(this); Attacks.SetAudio("Knife", 10); TimedMethod statPart = new TimedMethod("Null"); if (!Attacks.EvasionCheck(Party.GetEnemy(), Party.GetPlayer().GetAccuracy())) { Party.GetPlayer().SetCharge(Party.GetPlayer().GetCharge() + 2); statPart = new TimedMethod(0, "CharLogSprite", new object[] { "2", Party.playerSlot - 1, "charge", true }); } return(new TimedMethod[] { new TimedMethod(0, "Audio", new object[] { "Small Swing" }), new TimedMethod(0, "StagnantAttack", new object[] { true, 1, 1, Party.GetPlayer().GetAccuracy(), false, false, false }), statPart }); }
public void CancelItemUse() { Party.AddItem(useItemMenu.GetComponent <PartyMenu>().item); if (usingSpecial) { specialMenu.SetActive(true); usingSpecial = false; } else { itemSpace.SetActive(true); } useItemMenu.SetActive(false); largeMenuHides.SetActive(true); useItemMenu.GetComponent <PartyMenu>().item = null; useItemMenu.GetComponent <PartyMenu>().currentSpecial = null; }
public override TimedMethod[] Use() { bool space = false; Item[] bag = Party.GetItems(); for (int i = 0; i < 10; i++) { if (bag[i] == null) { space = true; break; } } if (!space) { return(new TimedMethod[] { new TimedMethod(0, "Audio", new object[] { "Steal1" }), new TimedMethod(0, "Audio", new object[] { "Steal" }), new TimedMethod(60, "Log", new object[] { "Your bag is full!" }) }); } Item[] stealable = Party.GetEnemy().drops; if (stealable.Length > 0) { System.Random rng = new System.Random(); int num = rng.Next(stealable.Length); Item stolen = stealable[num]; Item[] newDrops = new Item[stealable.Length - 1]; int j = 0; for (int i = 0; i < stealable.Length; i++) { if (i != num) { newDrops[j] = stealable[i]; j++; } } Party.GetEnemy().drops = newDrops; Party.AddItem(stolen); return(new TimedMethod[] { new TimedMethod(0, "Audio", new object[] { "Steal1" }), new TimedMethod(0, "Audio", new object[] { "Steal" }), new TimedMethod(60, "Log", new object[] { stolen.GetName() + " was stolen" }) }); } return(new TimedMethod[] { new TimedMethod(0, "Audio", new object[] { "Steal1" }), new TimedMethod(0, "Audio", new object[] { "Steal" }), new TimedMethod(60, "Log", new object[] { "Nothing to steal" }) }); }
public void CancelItemUse() { Party.AddItem(useItemMenu.GetComponent <PartyMenu>().item); if (!usingSpecial) { bagMenu.SetActive(true); } else { usingSpecial = false; nextMenu.SetActive(true); if (isEvent) { eventSpace.SetActive(true); } else { dungeonMaps.SetActive(true); } } useItemMenu.SetActive(false); useItemMenu.GetComponent <PartyMenu>().item = null; }
public void ConfirmPurchase() { if (resting) { foreach (Character c in Party.members) { if (c != null) { c.Heal(10); } messageLog.GetComponent <Text>().text = "Party healed 10 hp"; } } else { inventory.RemoveP(purchase); Party.AddItem(purchase); UpdateUI(); } resting = false; purchase = null; tradeItems.SetActive(false); storeUI.SetActive(true); }
public void Buy() { Party.AddItem(item); }
//Called upon use of the item outside of combat. If it can't be used, ignore this public virtual void UseOutOfCombat(int i) { Party.AddItem(this); }