public Trait DeepCopy() { Trait copy = new Trait(); copy.name = this.name; copy.tag = this.tag; copy.traitImage = this.traitImage; copy.description = this.description; copy.prerequisiteTrait = this.prerequisiteTrait; copy.skillModifier = this.skillModifier; copy.skillModifierAttribute = this.skillModifierAttribute; copy.useableInSituation = this.useableInSituation; copy.spriteFilename = this.spriteFilename; copy.spriteEndingFilename = this.spriteEndingFilename; copy.costSP = this.costSP; copy.traitTargetType = this.traitTargetType; copy.traitEffectType = this.traitEffectType; copy.aoeRadius = this.aoeRadius; copy.range = this.range; copy.traitScript = this.traitScript; return copy; }
//PARTY SCREEN public void redrawPartyBuild() { if (partyScreenPcIndex >= gv.mod.playerList.Count) { partyScreenPcIndex = 0; } if (pcIndex >= pcList.Count) { pcIndex = 0; } Player pc = null; if ((gv.mod.playerList.Count > 0) && (lastClickedPlayerList)) { pc = gv.mod.playerList[partyScreenPcIndex]; } else if ((pcList.Count > 0) && (!lastClickedPlayerList)) { pc = pcList[pcIndex]; } if (pc != null) { gv.sf.UpdateStats(pc); } int pW = (int)((float)gv.screenWidth / 100.0f); int pH = (int)((float)gv.screenHeight / 100.0f); int padH = gv.squareSize / 6; int locY = 0; int locX = 2 * gv.squareSize + gv.oXshift; int spacing = (int)gv.drawFontRegHeight; int tabX = pW * 50; int tabX2 = pW * 60; int leftStartY = 5 * gv.squareSize + (pH * 6); //Draw screen title name string text = "Party Members [" + gv.mod.numberOfPlayerMadePcsAllowed + " player made PC(s) allowed, " + gv.mod.numberOfPlayerMadePcsRequired + " required]"; // Measure string. float stringSize = gv.cc.MeasureString(text, SharpDX.DirectWrite.FontWeight.Normal, SharpDX.DirectWrite.FontStyle.Normal, gv.drawFontRegHeight); int ulX = (gv.screenWidth / 2) - ((int)stringSize / 2); gv.DrawText(text, ulX, pH * 3, 1.0f, Color.White); //DRAW EACH PC BUTTON this.refreshPlayerTokens(); int cntPCs = 0; foreach (IbbButton btn in btnPartyIndex) { if (cntPCs < gv.mod.playerList.Count) { if (cntPCs == partyScreenPcIndex) { btn.glowOn = true; } else { btn.glowOn = false; } btn.Draw(); } cntPCs++; } btnLeft.Draw(); btnRight.Draw(); btnAdd.Draw(); btnRemove.Draw(); btnCreate.Draw(); btnHelp.Draw(); btnReturn.Draw(); if (pcList.Count > 0) { gv.cc.DisposeOfBitmap(ref btnPcListIndex.Img2); btnPcListIndex.Img2 = gv.cc.LoadBitmap(pcList[pcIndex].tokenFilename); } else { btnPcListIndex.Img2 = null; } btnPcListIndex.Draw(); if (pc != null) { //DRAW LEFT STATS gv.DrawText("Name: " + pc.name, locX, locY += leftStartY); gv.DrawText(gv.mod.raceLabel + ": " + gv.mod.getRace(pc.raceTag).name, locX, locY += spacing); if (pc.isMale) { gv.DrawText("Gender: Male", locX, locY += spacing); } else { gv.DrawText("Gender: Female", locX, locY += spacing); } gv.DrawText("Class: " + gv.mod.getPlayerClass(pc.classTag).name, locX, locY += spacing); gv.DrawText("Level: " + pc.classLevel, locX, locY += spacing); gv.DrawText("XP: " + pc.XP + "/" + pc.XPNeeded, locX, locY += spacing); gv.DrawText("---------------", locX, locY += spacing); //draw spells known list string allSpells = ""; foreach (string s in pc.knownSpellsTags) { Spell sp = gv.mod.getSpellByTag(s); allSpells += sp.name + ", "; } gv.DrawText(gv.mod.getPlayerClass(pc.classTag).spellLabelPlural + ": " + allSpells, locX, locY += spacing); //draw traits known list string allTraits = ""; foreach (string s in pc.knownTraitsTags) { Trait tr = gv.mod.getTraitByTag(s); if (tr != null) { allTraits += tr.name + ", "; } } gv.DrawText(gv.mod.getPlayerClass(pc.classTag).traitLabelPlural + ": " + allTraits, locX, locY += spacing); //DRAW RIGHT STATS int actext = 0; if (gv.mod.ArmorClassAscending) { actext = pc.AC; } else { actext = 20 - pc.AC; } locY = 0; int locY2 = 0; if (gv.mod.useOrbitronFont == true) { locX = tabX - 3 * gv.squareSize; locY += leftStartY; //tabX2 = 0; locY2 += leftStartY - spacing * 3; //STR gv.DrawText("STR:", locX + pW, locY); gv.DrawText(pc.baseStr.ToString(), locX + 3 * pW * 2, locY); if (pc.strength - pc.baseStr >= 0) { gv.DrawText(" + ", locX + 4 * pW * 2, locY); } else { gv.DrawText(" - ", locX + 4 * pW * 2, locY); } int racial = pc.strength - pc.baseStr; if (racial < 0) { racial *= -1; } gv.DrawText(racial.ToString(), locX + 5 * pW * 2, locY); gv.DrawText(" = ", locX + 11 * pW, locY); gv.DrawText(pc.strength.ToString(), locX + 13 * pW, locY); if (((pc.strength - 10) / 2) > 0) { gv.DrawText(" (+" + ((pc.strength - 10) / 2) + ")", locX + 15 * pW, locY); } else { gv.DrawText(" (" + ((pc.strength - 10) / 2) + ")", locX + 15 * pW, locY); } gv.DrawText("AC: " + actext, tabX2, locY2 += (spacing * 3)); gv.DrawText("BAB: " + pc.baseAttBonus + ", Melee to hit/damage: " + (pc.baseAttBonus + ((pc.strength - 10) / 2)) + "/" + ((pc.strength - 10) / 2) + ", Ranged to hit: " + (pc.baseAttBonus + ((pc.dexterity - 10) / 2)), tabX2, locY2 += spacing); //DEX gv.DrawText("DEX:", locX + pW, locY += (spacing)); gv.DrawText(pc.baseDex.ToString(), locX + 3 * pW * 2, locY); if (pc.dexterity - pc.baseDex >= 0) { gv.DrawText(" + ", locX + 4 * pW * 2, locY); } else { gv.DrawText(" - ", locX + 4 * pW * 2, locY); } racial = pc.dexterity - pc.baseDex; if (racial < 0) { racial *= -1; } gv.DrawText(racial.ToString(), locX + 5 * pW * 2, locY); gv.DrawText(" = ", locX + 11 * pW, locY); gv.DrawText(pc.dexterity.ToString(), locX + 13 * pW, locY); if (((pc.dexterity - 10) / 2) > 0) { gv.DrawText(" (+" + ((pc.dexterity - 10) / 2) + ")", locX + 15 * pW, locY); } else { gv.DrawText(" (" + ((pc.dexterity - 10) / 2) + ")", locX + 15 * pW, locY); } gv.DrawText("HP: " + pc.hp + "/" + pc.hpMax, tabX2, locY2 += spacing); //CON gv.DrawText("CON:", locX + pW, locY += (spacing)); gv.DrawText(pc.baseCon.ToString(), locX + 3 * pW * 2, locY); if (pc.constitution - pc.baseCon >= 0) { gv.DrawText(" + ", locX + 4 * pW * 2, locY); } else { gv.DrawText(" - ", locX + 4 * pW * 2, locY); } racial = pc.constitution - pc.baseCon; if (racial < 0) { racial *= -1; } gv.DrawText(racial.ToString(), locX + 5 * pW * 2, locY); gv.DrawText(" = ", locX + 11 * pW, locY); gv.DrawText(pc.constitution.ToString(), locX + 13 * pW, locY); if (((pc.constitution - 10) / 2) > 0) { gv.DrawText(" (+" + ((pc.constitution - 10) / 2) + ")", locX + 15 * pW, locY); } else { gv.DrawText(" (" + ((pc.constitution - 10) / 2) + ")", locX + 15 * pW, locY); } gv.DrawText("SP: " + pc.sp + "/" + pc.spMax, tabX2, locY2 += spacing); //INT gv.DrawText("INT:", locX + pW, locY += (spacing)); gv.DrawText(pc.baseInt.ToString(), locX + 3 * pW * 2, locY); if (pc.intelligence - pc.baseInt >= 0) { gv.DrawText(" + ", locX + 4 * pW * 2, locY); } else { gv.DrawText(" - ", locX + 4 * pW * 2, locY); } racial = pc.intelligence - pc.baseInt; if (racial < 0) { racial *= -1; } gv.DrawText(racial.ToString(), locX + 5 * pW * 2, locY); gv.DrawText(" = ", locX + 11 * pW, locY); gv.DrawText(pc.intelligence.ToString(), locX + 13 * pW, locY); if (((pc.intelligence - 10) / 2) > 0) { gv.DrawText(" (+" + ((pc.intelligence - 10) / 2) + ")", locX + 15 * pW, locY); } else { gv.DrawText(" (" + ((pc.intelligence - 10) / 2) + ")", locX + 15 * pW, locY); } gv.DrawText("FORT: " + pc.fortitude + ", Acid: " + pc.damageTypeResistanceTotalAcid + "%" + ", Cold: " + pc.damageTypeResistanceTotalCold + "%" + ", Normal: " + pc.damageTypeResistanceTotalNormal + "%", tabX2, locY2 += spacing); gv.DrawText("REF: " + pc.reflex + ", Electricity: " + pc.damageTypeResistanceTotalElectricity + "%" + ", Fire: " + pc.damageTypeResistanceTotalFire + "%", tabX2, locY2 += spacing); gv.DrawText("WILL: " + pc.will + ", Magic: " + pc.damageTypeResistanceTotalMagic + "%" + ", Poison: " + pc.damageTypeResistanceTotalPoison + "%", tabX2, locY2 += spacing); //WIS gv.DrawText("WIS:", locX + pW, locY += (spacing)); gv.DrawText(pc.baseWis.ToString(), locX + 3 * pW * 2, locY); if (pc.wisdom - pc.baseWis >= 0) { gv.DrawText(" + ", locX + 4 * pW * 2, locY); } else { gv.DrawText(" - ", locX + 4 * pW * 2, locY); } racial = pc.wisdom - pc.baseWis; if (racial < 0) { racial *= -1; } gv.DrawText(racial.ToString(), locX + 5 * pW * 2, locY); gv.DrawText(" = ", locX + 11 * pW, locY); gv.DrawText(pc.wisdom.ToString(), locX + 13 * pW, locY); if (((pc.wisdom - 10) / 2) > 0) { gv.DrawText(" (+" + ((pc.wisdom - 10) / 2) + ")", locX + 15 * pW, locY); } else { gv.DrawText(" (" + ((pc.wisdom - 10) / 2) + ")", locX + 15 * pW, locY); } //CHA gv.DrawText("CHA:", locX + pW, locY += (spacing)); gv.DrawText(pc.baseCha.ToString(), locX + 3 * pW * 2, locY); if (pc.charisma - pc.baseCha >= 0) { gv.DrawText(" + ", locX + 4 * pW * 2, locY); } else { gv.DrawText(" - ", locX + 4 * pW * 2, locY); } racial = pc.charisma - pc.baseCha; if (racial < 0) { racial *= -1; } gv.DrawText(racial.ToString(), locX + 5 * pW * 2, locY); gv.DrawText(" = ", locX + 11 * pW, locY); gv.DrawText(pc.charisma.ToString(), locX + 13 * pW, locY); if (((pc.charisma - 10) / 2) > 0) { gv.DrawText(" (+" + ((pc.charisma - 10) / 2) + ")", locX + 15 * pW, locY); } else { gv.DrawText(" (" + ((pc.charisma - 10) / 2) + ")", locX + 15 * pW, locY); } if (gv.mod.useLuck) { if (((pc.luck - 10) / 2) > 0) { gv.DrawText("LCK: " + pc.baseLuck + " + " + (pc.luck - pc.baseLuck) + " = " + pc.luck, locX + pW, locY += spacing); } else { gv.DrawText("LCK: " + pc.baseLuck + " + " + (pc.luck - pc.baseLuck) + " = " + pc.luck, locX + pW, locY += spacing); } } /* * gv.DrawText("STR: " + pc.baseStr + " + " + (pc.strength - pc.baseStr) + " = " + pc.strength + " (" + ((pc.strength - 10) / 2) + ")", tabX - 3 * gv.squareSize, locY += leftStartY); * gv.DrawText("AC: " + actext, tabX2, locY2 += leftStartY); * //gv.DrawText("BAB: " + pc.baseAttBonus + ", Melee to hit/damage: " + (pc.baseAttBonus + ((pc.strength - 10) / 2)) + "/" + ((pc.strength - 10) / 2) + ", Ranged to hit: " + (pc.baseAttBonus + ((pc.dexterity - 10) / 2)), tabX2, locY2 += spacing); * gv.DrawText("BAB: " + pc.baseAttBonus + ", Melee to hit/damage: " + (pc.baseAttBonus + gv.sf.CalcPcMeleeAttackAttributeModifier(pc)) + "/" + (((pc.strength - 10) / 2) + gv.sf.CalcPcMeleeDamageModifier(pc)) + ", Ranged to hit: " + (pc.baseAttBonus + ((pc.dexterity - 10) / 2) + gv.sf.CalcPcRangedAttackModifier(pc)), tabX2, locY2 += spacing); * gv.DrawText("DEX: " + pc.baseDex + " + " + (pc.dexterity - pc.baseDex) + " = " + pc.dexterity + " (" + ((pc.dexterity - 10) / 2) + ")", tabX - 3 * gv.squareSize, locY += spacing); * gv.DrawText("HP: " + pc.hp + "/" + pc.hpMax, tabX2, locY2 += spacing); * gv.DrawText("CON: " + pc.baseCon + " + " + (pc.constitution - pc.baseCon) + " = " + pc.constitution + " (" + ((pc.constitution - 10) / 2) + ")", tabX - 3 * gv.squareSize, locY += spacing); * gv.DrawText("SP: " + pc.sp + "/" + pc.spMax, tabX2, locY2 += spacing); * gv.DrawText("INT: " + pc.baseInt + " + " + (pc.intelligence - pc.baseInt) + " = " + pc.intelligence + " (" + ((pc.intelligence - 10) / 2) + ")", tabX - 3 * gv.squareSize, locY += spacing); * gv.DrawText("FORT: " + pc.fortitude + ", Acid: " + pc.damageTypeResistanceTotalAcid + "%" + ", Cold: " + pc.damageTypeResistanceTotalCold + "%" + ", Normal: " + pc.damageTypeResistanceTotalNormal + "%", tabX2, locY2 += spacing); * gv.DrawText("REF: " + pc.reflex + ", Electricity: " + pc.damageTypeResistanceTotalElectricity + "%" + ", Fire: " + pc.damageTypeResistanceTotalFire + "%", tabX2, locY2 += spacing); * gv.DrawText("WILL: " + pc.will + ", Magic: " + pc.damageTypeResistanceTotalMagic + "%" + ", Poison: " + pc.damageTypeResistanceTotalPoison + "%", tabX2, locY2 += spacing); * gv.DrawText("WIS: " + pc.baseWis + " + " + (pc.wisdom - pc.baseWis) + " = " + pc.wisdom + " (" + ((pc.wisdom - 10) / 2) + ")", tabX - 3 * gv.squareSize, locY += spacing); * gv.DrawText("CHA: " + pc.baseCha + " + " + (pc.charisma - pc.baseCha) + " = " + pc.charisma + " (" + ((pc.charisma - 10) / 2) + ")", tabX - 3 * gv.squareSize, locY += spacing); * if (gv.mod.useLuck == true) * { * gv.DrawText("LCK: " + pc.baseLuck + " + " + (pc.luck - pc.baseLuck) + " = " + pc.luck, tabX - 3 * gv.squareSize, locY += spacing); * } */ } else { locX = tabX - 3 * gv.squareSize; locY += leftStartY; //tabX2 = 0; locY2 += leftStartY - spacing * 3; //STR gv.DrawText("STR:", locX + pW, locY); gv.DrawText(pc.baseStr.ToString(), locX + 3 * pW * 2, locY); if (pc.strength - pc.baseStr >= 0) { gv.DrawText(" + ", locX + 4 * pW * 2, locY); } else { gv.DrawText(" - ", locX + 4 * pW * 2, locY); } int racial = pc.strength - pc.baseStr; if (racial < 0) { racial *= -1; } gv.DrawText(racial.ToString(), locX + 5 * pW * 2, locY); gv.DrawText(" = ", locX + 11 * pW, locY); gv.DrawText(pc.strength.ToString(), locX + 13 * pW, locY); if (((pc.strength - 10) / 2) > 0) { gv.DrawText(" (+" + ((pc.strength - 10) / 2) + ")", locX + 15 * pW, locY); } else { gv.DrawText(" (" + ((pc.strength - 10) / 2) + ")", locX + 15 * pW, locY); } gv.DrawText("AC: " + actext, tabX2, locY2 += (spacing * 3)); gv.DrawText("BAB: " + pc.baseAttBonus + ", Melee to hit/damage: " + (pc.baseAttBonus + ((pc.strength - 10) / 2)) + "/" + ((pc.strength - 10) / 2) + ", Ranged to hit: " + (pc.baseAttBonus + ((pc.dexterity - 10) / 2)), tabX2, locY2 += spacing); //DEX gv.DrawText("DEX:", locX + pW, locY += (spacing)); gv.DrawText(pc.baseDex.ToString(), locX + 3 * pW * 2, locY); if (pc.dexterity - pc.baseDex >= 0) { gv.DrawText(" + ", locX + 4 * pW * 2, locY); } else { gv.DrawText(" - ", locX + 4 * pW * 2, locY); } racial = pc.dexterity - pc.baseDex; if (racial < 0) { racial *= -1; } gv.DrawText(racial.ToString(), locX + 5 * pW * 2, locY); gv.DrawText(" = ", locX + 11 * pW, locY); gv.DrawText(pc.dexterity.ToString(), locX + 13 * pW, locY); if (((pc.dexterity - 10) / 2) > 0) { gv.DrawText(" (+" + ((pc.dexterity - 10) / 2) + ")", locX + 15 * pW, locY); } else { gv.DrawText(" (" + ((pc.dexterity - 10) / 2) + ")", locX + 15 * pW, locY); } gv.DrawText("HP: " + pc.hp + "/" + pc.hpMax, tabX2, locY2 += spacing); //CON gv.DrawText("CON:", locX + pW, locY += (spacing)); gv.DrawText(pc.baseCon.ToString(), locX + 3 * pW * 2, locY); if (pc.constitution - pc.baseCon >= 0) { gv.DrawText(" + ", locX + 4 * pW * 2, locY); } else { gv.DrawText(" - ", locX + 4 * pW * 2, locY); } racial = pc.constitution - pc.baseCon; if (racial < 0) { racial *= -1; } gv.DrawText(racial.ToString(), locX + 5 * pW * 2, locY); gv.DrawText(" = ", locX + 11 * pW, locY); gv.DrawText(pc.constitution.ToString(), locX + 13 * pW, locY); if (((pc.constitution - 10) / 2) > 0) { gv.DrawText(" (+" + ((pc.constitution - 10) / 2) + ")", locX + 15 * pW, locY); } else { gv.DrawText(" (" + ((pc.constitution - 10) / 2) + ")", locX + 15 * pW, locY); } gv.DrawText("SP: " + pc.sp + "/" + pc.spMax, tabX2, locY2 += spacing); //INT gv.DrawText("INT:", locX + pW, locY += (spacing)); gv.DrawText(pc.baseInt.ToString(), locX + 3 * pW * 2, locY); if (pc.intelligence - pc.baseInt >= 0) { gv.DrawText(" + ", locX + 4 * pW * 2, locY); } else { gv.DrawText(" - ", locX + 4 * pW * 2, locY); } racial = pc.intelligence - pc.baseInt; if (racial < 0) { racial *= -1; } gv.DrawText(racial.ToString(), locX + 5 * pW * 2, locY); gv.DrawText(" = ", locX + 11 * pW, locY); gv.DrawText(pc.intelligence.ToString(), locX + 13 * pW, locY); if (((pc.intelligence - 10) / 2) > 0) { gv.DrawText(" (+" + ((pc.intelligence - 10) / 2) + ")", locX + 15 * pW, locY); } else { gv.DrawText(" (" + ((pc.intelligence - 10) / 2) + ")", locX + 15 * pW, locY); } gv.DrawText("FORT: " + pc.fortitude + ", Acid: " + pc.damageTypeResistanceTotalAcid + "%" + ", Cold: " + pc.damageTypeResistanceTotalCold + "%" + ", Normal: " + pc.damageTypeResistanceTotalNormal + "%", tabX2, locY2 += spacing); gv.DrawText("REF: " + pc.reflex + ", Electricity: " + pc.damageTypeResistanceTotalElectricity + "%" + ", Fire: " + pc.damageTypeResistanceTotalFire + "%", tabX2, locY2 += spacing); gv.DrawText("WILL: " + pc.will + ", Magic: " + pc.damageTypeResistanceTotalMagic + "%" + ", Poison: " + pc.damageTypeResistanceTotalPoison + "%", tabX2, locY2 += spacing); //WIS gv.DrawText("WIS:", locX + pW, locY += (spacing)); gv.DrawText(pc.baseWis.ToString(), locX + 3 * pW * 2, locY); if (pc.wisdom - pc.baseWis >= 0) { gv.DrawText(" + ", locX + 4 * pW * 2, locY); } else { gv.DrawText(" - ", locX + 4 * pW * 2, locY); } racial = pc.wisdom - pc.baseWis; if (racial < 0) { racial *= -1; } gv.DrawText(racial.ToString(), locX + 5 * pW * 2, locY); gv.DrawText(" = ", locX + 11 * pW, locY); gv.DrawText(pc.wisdom.ToString(), locX + 13 * pW, locY); if (((pc.wisdom - 10) / 2) > 0) { gv.DrawText(" (+" + ((pc.wisdom - 10) / 2) + ")", locX + 15 * pW, locY); } else { gv.DrawText(" (" + ((pc.wisdom - 10) / 2) + ")", locX + 15 * pW, locY); } //CHA gv.DrawText("CHA:", locX + pW, locY += (spacing)); gv.DrawText(pc.baseCha.ToString(), locX + 3 * pW * 2, locY); if (pc.charisma - pc.baseCha >= 0) { gv.DrawText(" + ", locX + 4 * pW * 2, locY); } else { gv.DrawText(" - ", locX + 4 * pW * 2, locY); } racial = pc.charisma - pc.baseCha; if (racial < 0) { racial *= -1; } gv.DrawText(racial.ToString(), locX + 5 * pW * 2, locY); gv.DrawText(" = ", locX + 11 * pW, locY); gv.DrawText(pc.charisma.ToString(), locX + 13 * pW, locY); if (((pc.charisma - 10) / 2) > 0) { gv.DrawText(" (+" + ((pc.charisma - 10) / 2) + ")", locX + 15 * pW, locY); } else { gv.DrawText(" (" + ((pc.charisma - 10) / 2) + ")", locX + 15 * pW, locY); } if (gv.mod.useLuck) { if (((pc.luck - 10) / 2) > 0) { gv.DrawText("LCK: " + pc.baseLuck + " + " + (pc.luck - pc.baseLuck) + " = " + pc.luck, locX + pW, locY += spacing); } else { gv.DrawText("LCK: " + pc.baseLuck + " + " + (pc.luck - pc.baseLuck) + " = " + pc.luck, locX + pW, locY += spacing); } } /* * gv.DrawText("STR: " + pc.baseStr + " + " + (pc.strength - pc.baseStr) + " = " + pc.strength + " (" + ((pc.strength - 10) / 2) + ")", tabX - 3 * gv.squareSize, locY += leftStartY); * gv.DrawText("AC: " + actext, tabX2, locY2 += leftStartY); * gv.DrawText("BAB: " + pc.baseAttBonus + ", Melee to hit/damage: " + (pc.baseAttBonus + gv.sf.CalcPcMeleeAttackAttributeModifier(pc)) + "/" + (((pc.strength - 10) / 2) + gv.sf.CalcPcMeleeDamageModifier(pc)) + ", Ranged to hit: " + (pc.baseAttBonus + ((pc.dexterity - 10) / 2) + gv.sf.CalcPcRangedAttackModifier(pc)), tabX2, locY2 += spacing); * gv.DrawText("DEX: " + pc.baseDex + " + " + (pc.dexterity - pc.baseDex) + " = " + pc.dexterity + " (" + ((pc.dexterity - 10) / 2) + ")", tabX - 3 * gv.squareSize, locY += spacing); * gv.DrawText("HP: " + pc.hp + "/" + pc.hpMax, tabX2, locY2 += spacing); * gv.DrawText("CON: " + pc.baseCon + " + " + (pc.constitution - pc.baseCon) + " = " + pc.constitution + " (" + ((pc.constitution - 10) / 2) + ")", tabX - 3 * gv.squareSize, locY += spacing); * gv.DrawText("SP: " + pc.sp + "/" + pc.spMax, tabX2, locY2 += spacing); * gv.DrawText("INT: " + pc.baseInt + " + " + (pc.intelligence - pc.baseInt) + " = " + pc.intelligence + " (" + ((pc.intelligence - 10) / 2) + ")", tabX - 3 * gv.squareSize, locY += spacing); * gv.DrawText("FORT: " + pc.fortitude + ", Acid: " + pc.damageTypeResistanceTotalAcid + "%" + ", Cold: " + pc.damageTypeResistanceTotalCold + "%" + ", Normal: " + pc.damageTypeResistanceTotalNormal + "%", tabX2, locY2 += spacing); * gv.DrawText("REF: " + pc.reflex + ", Electricity: " + pc.damageTypeResistanceTotalElectricity + "%" + ", Fire: " + pc.damageTypeResistanceTotalFire + "%", tabX2, locY2 += spacing); * gv.DrawText("WILL: " + pc.will + ", Magic: " + pc.damageTypeResistanceTotalMagic + "%" + ", Poison: " + pc.damageTypeResistanceTotalPoison + "%", tabX2, locY2 += spacing); * gv.DrawText("WIS: " + pc.baseWis + " + " + (pc.wisdom - pc.baseWis) + " = " + pc.wisdom + " (" + ((pc.wisdom - 10) / 2) + ")", tabX - 3 * gv.squareSize, locY += spacing); * gv.DrawText("CHA: " + pc.baseCha + " + " + (pc.charisma - pc.baseCha) + " = " + pc.charisma + " (" + ((pc.charisma - 10) / 2) + ")", tabX - 3 * gv.squareSize, locY += spacing); * if (gv.mod.useLuck == true) * { * gv.DrawText("LCK: " + pc.baseLuck + " + " + (pc.luck - pc.baseLuck) + " = " + pc.luck, tabX - 3 * gv.squareSize, locY += spacing); * } */ } } }
//PARTY SCREEN public void redrawPartyRoster() { if (partyScreenPcIndex >= gv.mod.playerList.Count) { partyScreenPcIndex = 0; } if (partyRosterPcIndex >= gv.mod.partyRosterList.Count) { partyRosterPcIndex = 0; } Player pc = null; if ((gv.mod.playerList.Count > 0) && (lastClickedPlayerList)) { pc = gv.mod.playerList[partyScreenPcIndex]; } else if ((gv.mod.partyRosterList.Count > 0) && (!lastClickedPlayerList)) { pc = gv.mod.partyRosterList[partyRosterPcIndex]; } if (pc != null) { gv.sf.UpdateStats(pc); } int pW = (int)((float)gv.screenWidth / 100.0f); int pH = (int)((float)gv.screenHeight / 100.0f); int padH = gv.squareSize / 6; int locY = 0; int locX = pW * 4; int textH = (int)gv.drawFontRegHeight; int spacing = textH; int tabX = pW * 50; int tabX2 = pW * 70; int leftStartY = 5 * gv.squareSize + (pH * 6); //Draw screen title name int textWidth = (int)gv.cc.MeasureString("Current Party Members [" + gv.mod.MaxPartySize + " Maximum]", SharpDX.DirectWrite.FontWeight.Normal, SharpDX.DirectWrite.FontStyle.Normal, gv.drawFontRegHeight); int ulX = (gv.screenWidth / 2) - (textWidth / 2); gv.DrawText("Current Party Members [" + gv.mod.MaxPartySize + " Maximum]", ulX, pH * 3, 1.0f, Color.Gray); //DRAW EACH PC BUTTON this.refreshPlayerTokens(); int cntPCs = 0; foreach (IbbButton btn in btnPartyIndex) { if (cntPCs < gv.mod.playerList.Count) { if (cntPCs == partyScreenPcIndex) { btn.glowOn = true; } else { btn.glowOn = false; } btn.Draw(); } cntPCs++; } //Draw screen title name textWidth = (int)gv.cc.MeasureString("Party Roster [Players in Reserve]", SharpDX.DirectWrite.FontWeight.Normal, SharpDX.DirectWrite.FontStyle.Normal, gv.drawFontRegHeight); ulX = (gv.screenWidth / 2) - (textWidth / 2); gv.DrawText("Party Roster [Players in Reserve]", ulX, 3 * gv.squareSize + (pH * 0), 1.0f, Color.Gray); //DRAW EACH ROSTER PC BUTTON this.refreshRosterPlayerTokens(); cntPCs = 0; foreach (IbbButton btn in btnPartyRosterIndex) { if (cntPCs < gv.mod.partyRosterList.Count) { if (cntPCs == partyRosterPcIndex) { btn.glowOn = true; } else { btn.glowOn = false; } btn.Draw(); } cntPCs++; } btnDown.Draw(); btnUp.Draw(); btnHelp.Draw(); btnReturn.Draw(); if (pc != null) { //DRAW LEFT STATS gv.DrawText("Name: " + pc.name, locX, locY += leftStartY); gv.DrawText(gv.mod.raceLabel + ": " + gv.mod.getRace(pc.raceTag).name, locX, locY += spacing); if (pc.isMale) { gv.DrawText("Gender: Male", locX, locY += spacing); } else { gv.DrawText("Gender: Female", locX, locY += spacing); } gv.DrawText("Class: " + gv.mod.getPlayerClass(pc.classTag).name, locX, locY += spacing); gv.DrawText("Level: " + pc.classLevel, locX, locY += spacing); gv.DrawText("XP: " + pc.XP + "/" + pc.XPNeeded, locX, locY += spacing); gv.DrawText("---------------", locX, locY += spacing); //draw spells known list string allSpells = ""; foreach (string s in pc.knownSpellsTags) { Spell sp = gv.mod.getSpellByTag(s); allSpells += sp.name + ", "; } gv.DrawText(pc.playerClass.spellLabelPlural + ": " + allSpells, locX, locY += spacing); //draw traits known list string allTraits = ""; foreach (string s in pc.knownTraitsTags) { Trait tr = gv.mod.getTraitByTag(s); allTraits += tr.name + ", "; } gv.DrawText(pc.playerClass.traitLabelPlural + ": " + allTraits, locX, locY += spacing); //DRAW RIGHT STATS int actext = 0; if (gv.mod.ArmorClassAscending) { actext = pc.AC; } else { actext = 20 - pc.AC; } locY = 0; gv.DrawText("STR: " + pc.strength, tabX, locY += leftStartY); gv.DrawText("AC: " + actext, tabX2, locY); gv.DrawText("DEX: " + pc.dexterity, tabX, locY += spacing); gv.DrawText("HP: " + pc.hp + "/" + pc.hpMax, tabX2, locY); gv.DrawText("CON: " + pc.constitution, tabX, locY += spacing); gv.DrawText("SP: " + pc.sp + "/" + pc.spMax, tabX2, locY); gv.DrawText("INT: " + pc.intelligence, tabX, locY += spacing); gv.DrawText("BAB: " + pc.baseAttBonus, tabX2, locY); gv.DrawText("WIS: " + pc.wisdom, tabX, locY += spacing); gv.DrawText("CHA: " + pc.charisma, tabX, locY += spacing); } }