float useMove(string charType, string moveType) { //returns a float that shows the multiplier to deal damage float outputPower = 1.0; //Fire type move if (moveType == "Fire" && (charType == "Dragon"||charType == "Fire"||charType == "Rock"||charType == "Water")) { outputPower = 0.5; llSay(0, moveType + " is not very effective against " + charType + "..."); } else if (moveType == "Fire" && (charType == "Bug"||charType == "Grass"||charType == "Ice")) { outputPower = 2; llSay(0, moveType + " is super effective against " + charType + "!"); } //Dragon type move if (moveType == "Dragon" && (charType == "Steel")) { outputPower = 0.5; llSay(0, moveType + " is not very effective against " + charType + "..."); } else if (moveType == "Dragon" && (charType == "Dragon")) { outputPower = 2; llSay(0, moveType + " is super effective against " + charType + "!"); } //Ground type move if (moveType == "Ground" && (charType == "Bug"||charType == "Grass")) { outputPower = 0.5; llSay(0, moveType + " is not very effective against " + charType + "..."); } else if (moveType == "Ground" && (charType == "Electric"||charType == "Fire"||charType == "Poison"||charType == "Rock"||charType == "Steel")) { outputPower = 2; llSay(0, moveType + " is super effective against " + charType + "!"); } else if (moveType == "Ground" && charType == "Flying") { outputPower = 0; llSay(0, moveType + " does not affect " + charType + "..."); } //Rock type move if (moveType == "Rock" && (charType == "Fighting"||charType == "Ground"||charType == "Steel")) { outputPower = 0.5; llSay(0, moveType + " is not very effective against " + charType + "..."); } else if (moveType == "Rock" && (charType == "Bug"||charType == "Fire"||charType == "Flying"||charType == "Ice")) { outputPower = 2; llSay(0, moveType + " is super effective against " + charType + "!"); } //Water type move if (moveType == "Water" && (charType == "Grass"||charType == "Dragon"||charType == "Water")) { outputPower = 0.5; llSay(0, moveType + " is not very effective against " + charType + "..."); } else if (moveType == "Water" && (charType == "Fire"||charType == "Ground"||charType == "Rock")) { outputPower = 2; llSay(0, moveType + " is super effective against " + charType + "!"); } //Grass type move if (moveType == "Grass" && (charType == "Grass"||charType == "Bug"||charType == "Dragon"||charType == "Fire"||charType == "Flying"||charType == "Poison"||charType == "Steel")) { outputPower = 0.5; llSay(0, moveType + " is not very effective against " + charType + "..."); } else if (moveType == "Grass" && (charType == "Ground"||charType == "Rock"||charType == "Water")) { outputPower = 2; llSay(0, moveType + " is super effective against " + charType + "!"); } //Electric type move if (moveType == "Electric" && (charType == "Electric"||charType == "Grass"||charType == "Dragon")) { outputPower = 0.5; llSay(0, moveType + " is not very effective against " + charType + "..."); } else if (moveType == "Electric" && (charType == "Flying"||charType == "Water")) { outputPower = 2; llSay(0, moveType + " is super effective against " + charType + "!"); } else if (moveType == "Electric" && charType == "Ground") { outputPower = 0; llSay(0, moveType + " does not affect " + charType + "..."); } //Phychic type move if (moveType == "Phychic" && (charType == "Fighting"||charType == "Poison")) { outputPower = 0.5; llSay(0, moveType + " is not very effective against " + charType + "..."); } else if (moveType == "Phychic" && (charType == "Phychic"||charType == "Steel")) { outputPower = 2; llSay(0, moveType + " is super effective against " + charType + "!"); } else if (moveType == "Phychic" && charType == "Dark") { outputPower = 0; llSay(0, moveType + " does not affect " + charType + "..."); } //Ice type move if (moveType == "Ice" && (charType == "Fire"||charType == "Ice"||charType == "Steel"||charType == "Water")) { outputPower = 0.5; llSay(0, moveType + " is not very effective against " + charType + "..."); } else if (moveType == "Ice" && (charType == "Dragon"||charType == "Flying"||charType == "Grass"||charType == "Ground")) { outputPower = 2; llSay(0, moveType + " is super effective against " + charType + "!"); } //Dark type move if (moveType == "Dark" && (charType == "Dark"||charType == "Fighting"||charType == "Steel")) { outputPower = 0.5; llSay(0, moveType + " is not very effective against " + charType + "..."); } else if (moveType == "Dark" && (charType == "Phychic"||charType == "Ghost")) { outputPower = 2; llSay(0, moveType + " is super effective against " + charType + "!"); } //Steel type move if (moveType == "Steel" && (charType == "Fire"||charType == "Electric"||charType == "Steel"||charType == "Water")) { outputPower = 0.5; llSay(0, moveType + " is not very effective against " + charType + "..."); } else if (moveType == "Steel" && (charType == "Ice"||charType == "Rock")) { outputPower = 2; llSay(0, moveType + " is super effective against " + charType + "!"); } //Ghost type move if (moveType == "Ghost" && (charType == "Dark"||charType == "Steel")) { outputPower = 0.5; llSay(0, moveType + " is not very effective against " + charType + "..."); } else if (moveType == "Ghost" && (charType == "Ghost"||charType == "Phychic")) { outputPower = 2; llSay(0, moveType + " is super effective against " + charType + "!"); } else if (moveType == "Ghost" && charType == "Normal") { outputPower = 0; llSay(0, moveType + " does not affect " + charType + "..."); } //Bug type move if (moveType == "Bug" && (charType == "Fighting"||charType == "Steel"||charType == "Poison"||charType == "Ghost"||charType == "Flying"||charType == "Fire")) { outputPower = 0.5; llSay(0, moveType + " is not very effective against " + charType + "..."); } else if (moveType == "Bug" && (charType == "Dark"||charType == "Phychic"||charType == "Grass")) { outputPower = 2; llSay(0, moveType + " is super effective against " + charType + "!"); } //Poison type move if (moveType == "Poison" && (charType == "Ghost"||charType == "Ground"||charType == "Poison"||charType == "Rock")) { outputPower = 0.5; llSay(0, moveType + " is not very effective against " + charType + "..."); } else if (moveType == "Poison" && (charType == "Grass")) { outputPower = 2; llSay(0, moveType + " is super effective against " + charType + "!"); } //Flying type move if (moveType == "Flying" && (charType == "Electric"||charType == "Steel"||charType == "Rock")) { outputPower = 0.5; llSay(0, moveType + " is not very effective against " + charType + "..."); } else if (moveType == "Flying" && (charType == "Grass"||charType == "Bug"||charType == "Fighting")) { outputPower = 2; llSay(0, moveType + " is super effective against " + charType + "!"); } //Fighting type move if (moveType == "Fighting" && (charType == "Poison"||charType == "Flying"||charType == "Bug"||charType == "Phychic")) { outputPower = 0.5; llSay(0, moveType + " is not very effective against " + charType + "..."); } else if (moveType == "Fighting" && (charType == "Normal"||charType == "Rock"||charType == "Steel"||charType == "Ice"||charType == "Dark")) { outputPower = 2; llSay(0, moveType + " is super effective against " + charType + "!"); } else if (moveType == "Fightning" && charType == "Ghost") { outputPower = 0; llSay(0, moveType + " does not affect " + charType + "..."); } //Normal type move if (moveType == "Normal" && (charType == "Rock"||charType == "Steel")) { outputPower = 0.5; llSay(0, moveType + " is not very effective against " + charType + "..."); } else if (moveType == "Normal" && charType == "Ghost") { outputPower = 0; llSay(0, moveType + " does not affect " + charType + "..."); } //outputPower is nothing more than a float to multiply by return outputPower; }