public Form1() { monster = new Monster(); InitializeComponent(); diffBox.SelectedIndex = 1; rankBox.SelectedIndex = 0; elementLabels.Add(Element.Fire, fireText); elementLabels.Add(Element.Holy, holyText); elementLabels.Add(Element.Ice, iceText); elementLabels.Add(Element.Lightning, litText); elementLabels.Add(Element.Shadow, shadText); elementLabels.Add(Element.Water, waterText); modColors.Add(ElementMod.Absorb, Properties.Settings.Default.AbsorbColour); modColors.Add(ElementMod.Immune, Properties.Settings.Default.ImmuneColour); modColors.Add(ElementMod.Resist, Properties.Settings.Default.ResistColour); modColors.Add(ElementMod.Weak, Properties.Settings.Default.WeakColour); modColors.Add(ElementMod.None, Properties.Settings.Default.NormalColour); weak_label.ForeColor = modColors[ElementMod.Weak]; normal_label.ForeColor = modColors[ElementMod.None]; resist_label.ForeColor = modColors[ElementMod.Resist]; immune_label.ForeColor = modColors[ElementMod.Immune]; absorb_label.ForeColor = modColors[ElementMod.Absorb]; this.UpdateData(false); }
public InputSelectAbility(Monster m) { InitializeComponent(); int i = 0; foreach (AbstractAbility a in m.Abilities) { abilities.Add(i, a); i++; comboBox1.Items.Add(a.ToString()); } comboBox1.SelectedIndex = 0; }
public override void Edit(Monster monster) { InputInflictsStatus savedDialog = new InputInflictsStatus(); savedDialog.LoadFromString(statusString); savedDialog.CostIsDelay = costIsDelay; if (savedDialog.ShowDialog() == DialogResult.OK) { slotCost = savedDialog.SlotCost(); string addedCostString; if (savedDialog.CostIsDelay) { costIsDelay = true; delayMod = savedDialog.DelayCost(); addedCostString = " (Cost: " + delayMod.ToString() + " +D)"; mpScale = 0; } else { costIsDelay = false; mpScale = savedDialog.MPScale(); addedCostString = " (Cost: " + mpScale.ToString() + " MP/Tier)"; delayMod = 0; } statusString = savedDialog.StatusString(); name = "Inflicts Status - " + statusString + addedCostString; statusRiderText = " <Inflicts " + statusString + ">"; } }
private void newButton_Click(object sender, EventArgs e) { //blank out all fields, empty all lists, create new Monster monster = new Monster(); diffBox.SelectedIndex = 1; rankBox.SelectedIndex = 0; this.UpdateDataFromLoad(); }
public override void Edit(Monster monster) { InputName d = new InputName(); d.SetName(baseName); if (d.ShowDialog() == DialogResult.OK) { String tmpName = d.ReturnName(); if (tmpName.Length > 0) { BasicAttackForm b = new BasicAttackForm(); b.SetTypeByDie(dieType); if (b.ShowDialog() == DialogResult.OK) { baseName = tmpName; if (baseAttack) { name = "Basic Attack: [" + tmpName + "]"; } else { name = "[" + tmpName + "]"; } switch (b.ChosenString()) { case "Light": //Light Attack baseDelay = 40; basePower = 3; powerPerTier = 3; dieType = DieType.d8; break; case "Medium": //Medium Attack baseDelay = 50; basePower = 4; powerPerTier = 4; dieType = DieType.d10; break; case "Heavy": //Heavy Attack baseDelay = 60; basePower = 5; powerPerTier = 5; dieType = DieType.d12; break; } } } } }
public int LookupStat(Monster parent, AttackType type) { if (type == AttackType.Physical) { return parent.ATK; } else if (type == AttackType.Magical) { return parent.MAG; } else { //wtf? return 0; } }
public override bool Prepare(Monster m) { parent = m; InputOtherAction dialog = new InputOtherAction(); dialog.ActivateKeywords(); if (dialog.ShowDialog() == DialogResult.OK) { keywords = dialog.Keywords; abilityType = dialog.AbilityType; name = "[" + dialog.AbilityName + "]"; slotCost = dialog.SlotCost; notes = dialog.Notes; //if it's an action if (abilityType == AbilityType.Action) { if (keywords.Contains(Keyword.Weapon)) { //handle this shit differently!!! weaponDelayMod = dialog.DelayMod; weaponFloorMod = dialog.FloorMod; weaponCoSMod = dialog.CoSMod; weaponPowMod = dialog.PowerMod; weaponPowModPerTier = dialog.PowerModPerTier; weaponDice = dialog.DieMod; weaponDicePerTier = dialog.DieModPerTier; weaponPowerMult = dialog.PowerMultiplier; weaponTargetType = dialog.TargetType; weaponMPCost = dialog.MP; weaponMPCostPerTier = dialog.MPPerTier; weaponCTCost = dialog.CT; if (weaponTargetType == TargetType.Null) { weaponTargetType = TargetType.Single; } type = AttackType.Physical; } else { type = dialog.AttackType; //it's a Aimed or Magic or some shit baseDelay = dialog.Delay; target = dialog.TargetType; baseCos = dialog.CoS; baseFloor = dialog.Floor; mp = dialog.MP; mpPerTierAfterOne = dialog.MPPerTier; chargeTime = dialog.CT; if (type == AttackType.Physical || type == AttackType.Magical ) { basePower = dialog.BasePower; powerPerTierAfterOne = dialog.PowerPerTier; dice = dialog.Dice; diePerTierAfterOne = dialog.DicePerTier; dieType = dialog.DieType; baseElement = dialog.Element; } } } else if (abilityType == AbilityType.Support) { type = AttackType.Null; target = TargetType.Null; //don't need to do anything else here! } else if (abilityType == AbilityType.Reaction) { type = AttackType.Null; target = TargetType.Null; } else { //wtf? } return true; } else { return false; } }
public override bool Prepare(Monster m) { if (this.GetParent() == m.BasicAttack) { Complain(4); return false; } InputStatus d = new InputStatus(false); if (d.ShowDialog() == DialogResult.OK) { String status = d.ChosenString(); if (status == "Stone" || status == "Sleep" || status == "Stop") { if (!m.HasLinkedStatusBonus) { slotCost = -1; m.HasLinkedStatusBonus = true; } } name = "Linked to Status: " + d.ChosenString(); return true; } else { return false; } }
public override bool Prepare(Monster m) { if (this.GetParent() == m.BasicAttack) { Complain(4); return false; } if (base.Prepare(m)) { InputRanks d = new InputRanks(); if (d.ShowDialog() == DialogResult.OK) { AbstractAbility p = (AbstractAbility)this.GetParent(); slotCost = d.NumberOfRanks(); chargeTime = 20 + 5 * d.NumberOfRanks(); powerMult = 1.5 + 0.5 * (d.NumberOfRanks() - 1); name += " - " + d.NumberOfRanks().ToString() + " ranks"; if (p.TargetType == TargetType.All || p.TargetType == TargetType.Group) { chargeTime += 10; } return true; } else { return false; } } else { return false; } }
public override void Edit(Monster monster) { if (monster.Rank.IsMinibossOrBoss()) { InputRanks d = new InputRanks(); d.SetRanks(ranks); if (d.ShowDialog() == DialogResult.OK) { ranks = d.NumberOfRanks(); slotCost = d.NumberOfRanks(); name = "Longer Status - Status Durations: +" + d.NumberOfRanks() + ", apply manually."; } } else { Complain(6); } }
public override bool Prepare(Monster m) { if (this.GetParent() == m.BasicAttack) { Complain(4); return false; } if (base.Prepare(m)) { if (m.Rank.IsMinibossOrBoss()) { //figure out how many ranks are being taken InputRanks d = new InputRanks(); if (d.ShowDialog() == DialogResult.OK) { ranks = d.NumberOfRanks(); slotCost = d.NumberOfRanks(); name = "Longer Status - Status Durations: +" + d.NumberOfRanks() + ", apply manually."; return true; } else { return false; } } else { slotCost = 1; name = "Longer Status - Status Durations +1, apply manually."; return true; } } else { return false; } }
public override void Edit(Monster monster) { if (monster.Rank.IsMinibossOrBoss()) { //figure out how many ranks are being taken InputRanks d = new InputRanks(); d.SetRanks(ranks); if (d.ShowDialog() == DialogResult.OK) { slotCost = d.NumberOfRanks(); cosMod = 5 * d.NumberOfRanks(); ranks = d.NumberOfRanks(); name = "High CoS: +" + cosMod.ToString() + "%"; } } else { Complain(6); } }
public override bool Prepare(Monster m) { if (base.Prepare(m)) { if (m.Rank.IsMinibossOrBoss()) { //figure out how many ranks are being taken InputRanks d = new InputRanks(); if (d.ShowDialog() == DialogResult.OK) { slotCost = d.NumberOfRanks(); cosMod = 5 * d.NumberOfRanks(); ranks = d.NumberOfRanks(); name = "High CoS: +" + cosMod.ToString() + "%"; return true; } else { return false; } } else { slotCost = 1; cosMod = 5; name = "+5 CoS"; return true; } } else { return false; } }
public override bool Prepare(Monster m) { return base.Prepare(m); }
public override void Recalculate(Monster monster) { AbstractAbility p = (AbstractAbility)this.GetParent(); if (p.TargetType == TargetType.Group) { cosMod = baseCoSMod - 10; } else if (p.TargetType == TargetType.Row) { cosMod = baseCoSMod - 5; } else { cosMod = baseCoSMod; } }
public override void Edit(Monster monster) { InputAdditionalCost dialog = new InputAdditionalCost(5, 20); if (dialog.ShowDialog() == DialogResult.OK) { if (dialog.Result() == AdditionalCost.Delay) { //delay cost chosen delayMod = 5; mpScale = 0; name = "Drain Health (Cost: +5D)"; } else { //MP Cost chosen mpScale = 20; delayMod = 0; name = "Drain Health (Cost: +20 MP/Tier)"; } } }
public override void Recalculate(Monster monster) { int baseCost = 3; if (monster.Tier < 4) { baseCost += 2; } if (modifiedAbility.TargetType != TargetType.Single) { baseCost += 4; } slotCost = baseCost; }
public override void Edit(Monster monster) { InputRanks d = new InputRanks(); d.SetRanks(slotCost); if (d.ShowDialog() == DialogResult.OK) { AbstractAbility p = (AbstractAbility)this.GetParent(); slotCost = d.NumberOfRanks(); chargeTime = 20 + 5 * d.NumberOfRanks(); powerMult = 1.5 + 0.5 * (d.NumberOfRanks() - 1); name = "Countdown - " + d.NumberOfRanks().ToString() + " ranks"; if (p.TargetType == TargetType.All || p.TargetType == TargetType.Group) { chargeTime += 10; } } }
public override void Edit(Monster monster) { InputOtherAction dialog = new InputOtherAction(); dialog.SlotsRemaining = parent.SlotsRemaining; dialog.AbilityName = name; dialog.SlotCost = slotCost; dialog.Notes = notes; //populate dialog keywords, make sure if weapon keyword it shows correct boxes! dialog.Keywords = keywords; dialog.ActivateKeywords(); dialog.AbilityType = abilityType; dialog.Element = baseElement; if (abilityType == AbilityType.Action) { if (this.keywords.Contains(Keyword.Weapon)) { dialog.DelayMod = weaponDelayMod; dialog.FloorMod = weaponFloorMod; dialog.MP = weaponMPCost; dialog.MPPerTier = weaponMPCostPerTier; dialog.CT = weaponCTCost; dialog.CoSMod = weaponCoSMod; dialog.TargetType = weaponTargetType; dialog.DieMod = weaponDice; dialog.DieModPerTier = weaponDicePerTier; dialog.PowerMod = weaponPowMod; dialog.PowerModPerTier = weaponPowModPerTier; dialog.PowerMultiplier = weaponPowerMult; } else { dialog.Delay = baseDelay; dialog.Floor = baseFloor; dialog.MP = mp; dialog.MPPerTier = mpPerTierAfterOne; dialog.CT = chargeTime; dialog.CoS = baseCos; dialog.TargetType = target; dialog.DieType = dieType; dialog.AttackType = type; dialog.Dice = dice; dialog.DicePerTier = diePerTierAfterOne; dialog.BasePower = basePower; dialog.PowerPerTier = powerPerTierAfterOne; } } if (dialog.ShowDialog() == DialogResult.OK) { int slotCostDifference = dialog.SlotCost - slotCost; if (slotCostDifference <= parent.SlotsRemaining) { //update keywords list based on dialog results slotCost = dialog.SlotCost; name = "[" + dialog.AbilityName + "]"; notes = dialog.Notes; abilityType = dialog.AbilityType; baseElement = dialog.Element; if (abilityType == AbilityType.Action) { if (this.keywords.Contains(Keyword.Weapon)) { weaponTargetType = dialog.TargetType; weaponDelayMod = dialog.Delay; weaponCoSMod = dialog.CoS; weaponFloorMod = dialog.Floor; weaponCTCost = dialog.CT; weaponDice = dialog.DieMod; weaponDicePerTier = dialog.DieModPerTier; weaponMPCost = dialog.MP; weaponMPCostPerTier = dialog.MPPerTier; weaponPowerMult = dialog.PowerMultiplier; weaponPowMod = dialog.PowerMod; weaponPowModPerTier = dialog.PowerModPerTier; } else { baseDelay = dialog.Delay; baseFloor = dialog.Floor; mp = dialog.MP; mpPerTierAfterOne = dialog.MPPerTier; chargeTime = dialog.CT; baseCos = dialog.CoS; basePower = dialog.BasePower; powerPerTierAfterOne = dialog.PowerPerTier; dice = dialog.Dice; diePerTierAfterOne = dialog.DicePerTier; dieType = dialog.DieType; target = dialog.TargetType; type = dialog.AttackType; } } else { //reaction or support are treated identically at this point target = TargetType.Null; type = AttackType.Null; } } else { Complain(5); } } }
public override void Recalculate(Monster monster) { AbstractAbility p = (AbstractAbility)this.GetParent(); if (p.TargetType == TargetType.All || p.TargetType == TargetType.Group) { chargeTime = 30 + 5 * slotCost; } else { chargeTime = 20 + 5 * slotCost; } }
public virtual bool Prepare(Monster m) { return true; }
public override bool Prepare(Monster m) { if (this.GetParent() == m.BasicAttack) { Complain(4); return false; } if (base.Prepare(m)) { if (m.Tier == 1) { slotCost += 2; } InputTectonicType dialog = new InputTectonicType(); if (dialog.ShowDialog() == DialogResult.OK) { if (dialog.NonElemental()) { name += " - Strips Element"; slotCost += 1; stripsElement = true; InputAdditionalCost dialog2 = new InputAdditionalCost(5, 20); if (dialog2.ShowDialog() == DialogResult.OK) { if (dialog2.Result() == AdditionalCost.Delay) { name += " (Cost: +5D)"; delayMod = 5; } else { name += " (Cost: +20 MP/Tier)"; mpScale = 20; } } } if (dialog.Result() == TectonicResult.PowerMod) { name += " - Increased Power"; powerMod = 3; } else { name += " - Delays struck targets by 10D"; } return true; } else { return false; } } else { return false; } }
public override bool Prepare(Monster m) { if (modifiedAbility.IsNull) { if (m.Abilities.Count == 0) { Complain(3); return false; } else { InputSelectAbility d = new InputSelectAbility(m); if (d.ShowDialog() == DialogResult.OK) { if (d.GetSelectedAbility().IsNull) { Complain(3); return false; } else { modifiedAbility = d.GetSelectedAbility(); return true; } } else { return false; } } } else { return true; } }
public override void Edit(Monster monster) { if (monster.Tier == 1) { slotCost = 3; } else { slotCost = 1; } InputTectonicType dialog = new InputTectonicType(); if (dialog.ShowDialog() == DialogResult.OK) { name = "Tectonic"; if (dialog.NonElemental()) { name += " - Strips Element"; slotCost += 1; stripsElement = true; InputAdditionalCost dialog2 = new InputAdditionalCost(5, 20); if (dialog2.ShowDialog() == DialogResult.OK) { if (dialog2.Result() == AdditionalCost.Delay) { name += " (Cost: +5D)"; delayMod = 5; mpScale = 0; } else { name += " (Cost: +20 MP/Tier)"; delayMod = 0; mpScale = 20; } } } else { delayMod = 0; mpScale = 0; stripsElement = false; } if (dialog.Result() == TectonicResult.PowerMod) { name += " - Increased Power"; powerMod = 3; } else { name += " - Delays struck targets by 10D"; powerMod = 0; } } }
public override bool Prepare(Monster m) { parent = m; slotCost = 1; InputName d = new InputName(); if (d.ShowDialog() == DialogResult.OK) { String tmpName = d.ReturnName(); if (tmpName.Length > 0) { baseName = tmpName; if (baseAttack) { name = "Basic Attack: [" + tmpName + "]"; } else { name = "[" + tmpName + "]"; } BasicAttackForm b = new BasicAttackForm(); if (b.ShowDialog() == DialogResult.OK) { switch (b.ChosenString()) { case "Light": //Light Attack baseDelay = 40; basePower = 3; powerPerTier = 3; dieType = DieType.d8; break; case "Medium": //Medium Attack baseDelay = 50; basePower = 4; powerPerTier = 4; dieType = DieType.d10; break; case "Heavy": //Heavy Attack baseDelay = 60; basePower = 5; powerPerTier = 5; dieType = DieType.d12; break; } return base.Prepare(m); } else { return false; } } else { return false; } } else { return false; } }
public override void Recalculate(Monster monster) { int baseSlotCost = 1; if (monster.Tier == 1) { baseSlotCost += 2; } if (stripsElement) { baseSlotCost++; } slotCost = baseSlotCost; }
private void loadButton_Click(object sender, EventArgs e) { //load monster data from a file if (loadDialog.ShowDialog() == DialogResult.OK) { FileInfo file = new FileInfo(loadDialog.FileName); BinaryFormatter b = new BinaryFormatter(); Stream s = file.Open(FileMode.Open); monster = (Monster)b.Deserialize(s); s.Close(); this.UpdateDataFromLoad(); } }
public override bool Prepare(Monster m) { if (this.GetParent() == m.BasicAttack) { Complain(4); return false; } if (base.Prepare(m)) { InputAdditionalCost dialog = new InputAdditionalCost(5, 20); if (dialog.ShowDialog() == DialogResult.OK) { if (dialog.Result() == AdditionalCost.Delay) { //delay cost chosen delayMod = 5; name += " (Cost: +5D)"; } else { //MP Cost chosen mpScale = 20; name += " (Cost: +20 MP/Tier)"; } return true; } else { return false; } } return false; }
public override bool Prepare(Monster m) { if (base.Prepare(m)) { int tmpSlotCost = 0; if (modifiedAbility.TargetType == TargetType.Single) { tmpSlotCost = 3; } else { tmpSlotCost = 7; } if (m.Tier < 4) { slotCost = tmpSlotCost + 2; } else { slotCost = tmpSlotCost; } if (this.GetParent() != m.BasicAttack) { InputAdditionalCost dialog = new InputAdditionalCost(5, 20); if (dialog.ShowDialog() == DialogResult.OK) { if (dialog.Result() == AdditionalCost.Delay) { //delay cost chosen delayMod = 5; name += " (Cost: +5D)"; } else { //MP Cost chosen mpScale = 20; name += " (Cost: +20 MP/Tier)"; } return true; } else { return false; } } else { delayMod = 5; name += " (Cost: +5D)"; return true; } } else { return false; } }
public override bool Prepare(Monster m) { if (this.GetParent() == m.BasicAttack) { Complain(4); return false; } if (base.Prepare(m)) { InputInflictsStatus savedDialog = new InputInflictsStatus(); if (savedDialog.ShowDialog() == DialogResult.OK) { slotCost = savedDialog.SlotCost(); cosMod = savedDialog.CoSMod(); baseCoSMod = cosMod; string addedCostString; if (savedDialog.CostIsDelay) { costIsDelay = true; delayMod = savedDialog.DelayCost(); addedCostString = " (Cost: " + delayMod.ToString() + " +D)"; } else { costIsDelay = false; mpScale = savedDialog.MPScale(); addedCostString = " (Cost: " + mpScale.ToString() + " MP/Tier)"; } statusString = savedDialog.StatusString(); name = "Inflicts Status - " + statusString + addedCostString; statusRiderText = " <Inflicts " + statusString + ">"; return true; } else { return false; } } else { return false; } }