private MoveProperties ParseMovePropertiesFromNotes(string notes) { var props = new MoveProperties(); if (string.IsNullOrWhiteSpace(notes)) { return(props); } if (notes.ToLower().Contains("power crush")) { props.PowerCrush = true; } if (notes.ToLower().Contains("Homing")) { props.Homing = true; } if (notes.ToLower().Contains("tail spin")) { props.TailSpin = true; } if (notes.ToLower().Contains("wall splat")) { props.WallSplat = true; } if (notes.ToLower().Contains("wall bounce")) { props.WallBounce = true; } if (notes.ToLower().Contains("rage")) { props.Rage = true; } return(props); }
void Move(MoveProperties props) { MoveCommand moveCommand = new MoveCommand(); moveCommand.orginalPosition = transform.position; moveCommand.destPosition = props.dest.transform.position; moveCommand.entityMoved = gameObject; moveCommandSignal.Invoke(moveCommand); }
public Move(String dataString) { string[] data = dataString.Split(','); id = Convert.ToInt32(data[0]); internalName = data[1]; dispalyName = data[2]; functionCode = Int32.Parse(data[3]); baseDamage = Convert.ToInt32(data[4]); type = data[5]; moveCategory = (MoveCategory)Enum.Parse(typeof(MoveCategory), data[6]); accuracy = Convert.ToInt32(data[7]); totalPP = Convert.ToInt32(data[8]); additionalEffectChance = Convert.ToInt32(data[9]); target = (Target)Enum.Parse(typeof(Target), data[10]); priority = Convert.ToInt32(data[11]); moveProperties = MovePropertiesFromString(data[12]); description = data[13]; }
private String MovePropertiesToDataString(MoveProperties props) { String value = ""; if ((props & MoveProperties.PhysicalContact) == MoveProperties.PhysicalContact) { value += "a"; } if ((props & MoveProperties.Protect) == MoveProperties.Protect) { value += "b"; } if ((props & MoveProperties.MagicCoat) == MoveProperties.MagicCoat) { value += "c"; } if ((props & MoveProperties.Snatch) == MoveProperties.Snatch) { value += "d"; } if ((props & MoveProperties.MirrorMove) == MoveProperties.MirrorMove) { value += "e"; } if ((props & MoveProperties.KingsRock) == MoveProperties.KingsRock) { value += "f"; } if ((props & MoveProperties.ThawUser) == MoveProperties.ThawUser) { value += "g"; } if ((props & MoveProperties.HighCritRate) == MoveProperties.HighCritRate) { value += "h"; } if ((props & MoveProperties.HealingMove) == MoveProperties.HealingMove) { value += "i"; } if ((props & MoveProperties.PunchMove) == MoveProperties.PunchMove) { value += "j"; } if ((props & MoveProperties.SoundMove) == MoveProperties.SoundMove) { value += "k"; } if ((props & MoveProperties.Gravity) == MoveProperties.Gravity) { value += "l"; } if ((props & MoveProperties.NoSkyBattle) == MoveProperties.NoSkyBattle) { value += "m"; } if ((props & MoveProperties.SlashingMove) == MoveProperties.SlashingMove) { value += "n"; } return(value); }
private MoveProperties MovePropertiesFromString(String value) { MoveProperties props = MoveProperties.None; if (value.Contains("a")) { props |= MoveProperties.PhysicalContact; } if (value.Contains("b")) { props |= MoveProperties.Protect; } if (value.Contains("c")) { props |= MoveProperties.MagicCoat; } if (value.Contains("d")) { props |= MoveProperties.Snatch; } if (value.Contains("e")) { props |= MoveProperties.MirrorMove; } if (value.Contains("f")) { props |= MoveProperties.KingsRock; } if (value.Contains("g")) { props |= MoveProperties.ThawUser; } if (value.Contains("h")) { props |= MoveProperties.HighCritRate; } if (value.Contains("i")) { props |= MoveProperties.HealingMove; } if (value.Contains("j")) { props |= MoveProperties.PunchMove; } if (value.Contains("k")) { props |= MoveProperties.SoundMove; } if (value.Contains("l")) { props |= MoveProperties.Gravity; } if (value.Contains("m")) { props |= MoveProperties.NoSkyBattle; } if (value.Contains("n")) { props |= MoveProperties.SlashingMove; } return(props); }
private String MovePropertiesToDataString(MoveProperties props) { String value = ""; if ((props & MoveProperties.PhysicalContact)==MoveProperties.PhysicalContact) value += "a"; if ((props & MoveProperties.Protect) == MoveProperties.Protect) value += "b"; if ((props & MoveProperties.MagicCoat) == MoveProperties.MagicCoat) value += "c"; if ((props & MoveProperties.Snatch) == MoveProperties.Snatch) value += "d"; if ((props & MoveProperties.MirrorMove) == MoveProperties.MirrorMove) value += "e"; if ((props & MoveProperties.KingsRock) == MoveProperties.KingsRock) value += "f"; if ((props & MoveProperties.ThawUser) == MoveProperties.ThawUser) value += "g"; if ((props & MoveProperties.HighCritRate) == MoveProperties.HighCritRate) value += "h"; if ((props & MoveProperties.HealingMove) == MoveProperties.HealingMove) value += "i"; if ((props & MoveProperties.PunchMove) == MoveProperties.PunchMove) value += "j"; if ((props & MoveProperties.SoundMove) == MoveProperties.SoundMove) value += "k"; if ((props & MoveProperties.Gravity) == MoveProperties.Gravity) value += "l"; if ((props & MoveProperties.NoSkyBattle) == MoveProperties.NoSkyBattle) value += "m"; if ((props & MoveProperties.SlashingMove) == MoveProperties.SlashingMove) value += "n"; return value; }
public Move(String dataString) { string[] data = dataString.Split(','); id = Convert.ToInt32(data[0]); internalName = data[1]; dispalyName = data[2]; functionCode = Int32.Parse(data[3]); baseDamage = Convert.ToInt32(data[4]); type = data[5]; moveCategory = (MoveCategory)Enum.Parse(typeof(MoveCategory), data[6]); accuracy = Convert.ToInt32(data[7]); totalPP = Convert.ToInt32(data[8]); additionalEffectChance = Convert.ToInt32(data[9]); target = (Target)Enum.Parse(typeof(Target), data[10]); priority = Convert.ToInt32(data[11]); moveProperties = MovePropertiesFromString(data[12]); description = data[13]; }