public override string ToString() { string ret = ""; ret += "CardTemplate{[" + Id + "][" + Name + "][" + Cost.ToString() + "][" + Type + "]"; if (Type == "Minion") { if (Race != String.Empty) { ret += "[" + Race + "]"; } ret += "[" + Atk.ToString() + "]"; ret += "[" + Health.ToString() + "]"; } else if (Type == "Weapon") { ret += "[" + Atk.ToString() + "]"; ret += "[" + Durability.ToString() + "]"; } ret += "}"; return(ret); }
// Start is called before the first frame update void Start() { StartCoroutine(SetMoves()); //MoveId1 = Random.Range(1, 6); //MoveId2 = Random.Range(6, 11); //MoveId3 = Random.Range(11, 16); //MoveId4 = Random.Range(16, 21); name = "The Player"; // es = Enemy.GetComponent<EnemyScr>(); //we are going to want to start the player off with two random moves, one to attack, one to defend Stuntime = -1; Muck = -1; IsCharacterTurn = true; StartAtk = 10; StartDef = 10; StartLuck = 10; AtkText.text = "Atk X " + Atk.ToString(); DefText.text = "Def X " + Def.ToString(); LuckText.text = "Luck X " + Luck.ToString(); LvlText.text = "Lvl X " + Lvl.ToString(); ChipsText.text = "Chips X " + Chips.ToString(); // MoveId1 = 0; //id for first move // MoveId2 = 0; //id for second move // MoveId3 = 0; //id for third move // MoveId4 = 0; //id for fourth move }
public Image GetPreview() { ControlPlus.TipImage tipData = new ControlPlus.TipImage(160); tipData.AddTextNewLine(string.Format("{0} Lv{1}", Name, Level.ToString()), Camp == CampConfig.Indexer.Reborn ? "Lime" : "Red", 20); tipData.AddTextNewLine("", "White", 20); tipData.AddImageXY(HSIcons.GetIconsByEName("hatt1"), 0, 0, 32, 32, 5, 20, 20, 20); tipData.AddTextOff(Atk.ToString(), "White", 30); tipData.AddImageXY(HSIcons.GetIconsByEName("hatt2"), 0, 0, 32, 32, 5 + 80, 20, 20, 20); tipData.AddTextOff(Def.ToString(), "White", 30 + 80); tipData.AddTextNewLine("", "White", 20); tipData.AddImageXY(HSIcons.GetIconsByEName("hatt5"), 0, 0, 32, 32, 5, 40, 20, 20); tipData.AddTextOff(Mov.ToString(), "White", 30); tipData.AddImageXY(HSIcons.GetIconsByEName("hatt8"), 0, 0, 32, 32, 5 + 80, 40, 20, 20); tipData.AddTextOff(Range.ToString(), "White", 30 + 80); tipData.AddTextNewLine("", "White", 20); tipData.AddImageXY(HSIcons.GetIconsByEName("hatt7"), 0, 0, 32, 32, 5, 60, 20, 20); tipData.AddTextOff(string.Format("{0}/{1}", LeftHp, baseAttr.Hp), "White", 30); return(tipData.Image); }
public void UpdateStats() { cultistCountText.text = units.ToString(); terAtkText.text = Atk.ToString(); terDefText.text = Def.ToString(); }
// This method is only called when a frame is going to be displayed // Avoids unnecessary costly functions public void DisplayPrep() { if (FrameType != FrameType.Method5Natures && FrameType != FrameType.BredAlternate && FrameType != FrameType.BredSplit && FrameType != FrameType.Bred && FrameType != FrameType.DPPtBred && FrameType != FrameType.HGSSBred && FrameType != FrameType.BWBred && FrameType != FrameType.BWBredInternational && FrameType != FrameType.RSBredUpper && FrameType != FrameType.RSBredUpperSplit) { DisplayHp = Hp.ToString(); DisplayAtk = Atk.ToString(); DisplayDef = Def.ToString(); DisplaySpa = Spa.ToString(); DisplaySpd = Spd.ToString(); DisplaySpe = Spe.ToString(); } if (FrameType == FrameType.BWBred || FrameType == FrameType.BWBredInternational) { var rngArray = new uint[6]; rngArray[0] = inh1; rngArray[1] = inh2; rngArray[2] = inh3; rngArray[3] = par1; rngArray[4] = par2; rngArray[5] = par3; DisplayHpAlt = Hp.ToString(); DisplayAtkAlt = Atk.ToString(); DisplayDefAlt = Def.ToString(); DisplaySpaAlt = Spa.ToString(); DisplaySpdAlt = Spd.ToString(); DisplaySpeAlt = Spe.ToString(); for (uint cnt = 0; cnt < 3; cnt++) { uint parent = rngArray[3 + cnt] & 1; // We have our parent and we have our slot, so lets // put them in the correct place here string parentString = (parent == 1 ? "Fe" : "Ma"); switch (rngArray[cnt]) { case 0: DisplayHp = parentString; break; case 1: DisplayAtk = parentString; break; case 2: DisplayDef = parentString; break; case 3: DisplaySpa = parentString; break; case 4: DisplaySpd = parentString; break; case 5: DisplaySpe = parentString; break; } } } }
public void EmitTextChanged (Atk.TextChangedDetail detail, int position, int length, string curText) { if (curText == null) curText = Text; GLib.Timeout.Add (0, new GLib.TimeoutHandler (delegate { cachedText = curText.Substring (position, length); cachedTextStart = position; cachedTextEnd = position + length; GLib.Signal.Emit (resource, "text_changed::" + detail.ToString ().ToLower (), position, length); cachedText = null; return false; })); }
public IEnumerator CreateEnemy() { TraitScr.ShouldSpin = false; ElementScr.ShouldSpin = false; MonsterScr.ShouldSpin = false; IsCharacterTurn = false; ps.IsCharacterTurn = true; wait = false; pc = ps.GetComponent <Character>(); ec = es.GetComponent <Character>(); //new ids and stats ElementId = Random.Range(1, 6); TraitId = Random.Range(6, 11); MonsterId = Random.Range(11, 16); Muck = -1; Chips = 100 + (ps.Lvl * 10); Atk = 0; Def = 0; Luck = 0; Frozen = false; setTrait(TraitId); setElement(ElementId); setMonster(MonsterId); float a = (float)Atk * (((float)ps.Lvl * 0.1f) + 0.2f); float d = (float)Def * (((float)ps.Lvl * 0.1f) + 0.2f); float l = (float)Luck * (((float)ps.Lvl * 0.1f) + 0.2f); Atk = (int)a; Def = (int)d; Luck = (int)l; Stuntime = -1; AtkText.text = "Atk X " + Atk.ToString(); DefText.text = "Def X " + Def.ToString(); LuckText.text = "Luck X " + Luck.ToString(); ChipsText.text = "Chips X " + Chips.ToString(); name = NameText.text; //declare the monster Description.text = "A " + name + " appears!"; mm.b1.interactable = true; mm.b2.interactable = true; mm.b3.interactable = true; mm.b4.interactable = true; Description.text += "\nIt is your turn!"; mm.MoveBtn.interactable = true; if (mm.PlayerID == 1) { mm.b1.interactable = false; } if (mm.PlayerID == 2) { mm.b2.interactable = false; } if (mm.PlayerID == 3) { mm.b3.interactable = false; } if (mm.PlayerID == 4) { mm.b4.interactable = false; } // yield return new WaitForSeconds(1f); TraitScr.SetImage(TraitId - 6); // yield return new WaitForSeconds(1f); ElementScr.SetImage(ElementId - 1); // yield return new WaitForSeconds(1f); MonsterScr.SetImage(MonsterId - 11); yield return(null); }
public string StatLine() { return("HP: " + maxHP.ToString() + ", IV: " + HPIV.ToString() + ", EV: " + HPEV.ToString() + " Attack: " + Atk.ToString() + ", IV: " + AtkIV.ToString() + ", EV: " + AtkEV.ToString() + " Defense: " + Def.ToString() + ", IV: " + DefIV.ToString() + ", EV: " + DefEV.ToString() + System.Environment.NewLine + "Special Attack: " + SpA.ToString() + ", IV: " + SpAIV.ToString() + ", EV: " + SpAEV.ToString() + " Special Defense: " + SpD.ToString() + ", IV: " + SpDIV.ToString() + ", EV: " + SpDEV.ToString() + " Speed: " + Spe.ToString() + ", IV: " + SpeIV.ToString() + ", EV: " + SpeEV.ToString()); }
public string Print() { return("Name: " + Pokemon + ", National Pokedex Number: " + Per.ToString() + ", Regional Pokedex Number: " + Nat + ", Base HP: " + HP.ToString() + ", Base Attack: " + Atk.ToString() + ", Base Defense: " + Def.ToString() + ", Base Sp.Attack: " + SpA.ToString() + ", Base Sp.Def: " + SpD.ToString() + ", Base Speed: " + Spe.ToString() + ", Total Base Stats: " + Total.ToString() + ", Type I: " + Type_I + ", Type II: " + Type_II + ", Tier: " + Tier + ", Ability I: " + Ability_I + ", Ability II: " + Ability_II + ", Hidden Ability: " + Hidden_Ability + ", Mass: " + Mass + ", Low Kick/Grass Knot damage: " + LK_GK.ToString() + ", EV Worth: " + EV_Worth + ", Exp Value: " + EXPV.ToString() + ", Pokedex Color: " + Color + ", Hatch: " + Hatch.ToString() + ", Gender" + Gender + ", Egg Group I: " + Egg_Group_I + ", Egg Group II: " + Egg_Group_II + ", Catch Rate: " + Catch.ToString() + ", Leveling Rate: " + LevelingRate()); }