let aer = tempVars("aer") * 2; let cvy = tempVars("cvy") * 3; let cpt = tempVars("cpt") * 5; Actions.storeValue(aer, 1, "catapult", cache); Actions.storeValue(cvy, 1, "cavalry", cache); Actions.storeValue(cpt, 1, "archer", cache); // birliklerin gucleri let me = tempVars("swm") + aer + cvy + cpt Actions.storeValue(me, 1, "me", cache); // birliklerin toplami if (me > 1) { //if the variable is the value, do this js here (dbm true) let eswm = tempVars("swm") * 2 let eaer = tempVars("swm") * 2 let ecvy = tempVars("swm") * 2 let ecpt = tempVars("swm") * 2 const randomswm = Math.floor(Math.random() * (eswm - 1)) + 1; Actions.storeValue(randomswm, 1, "eswm", cache); const randomaer = Math.floor(Math.random() * (eaer - 1)) + 1; Actions.storeValue(randomaer, 1, "eaer", cache); const randomcvy = Math.floor(Math.random() * (ecvy - 1)) + 1; Actions.storeValue(randomcvy, 1, "ecvy", cache); const randomcpt = Math.floor(Math.random() * (ecpt - 1)) + 1; Actions.storeValue(randomcpt, 1, "ecpt", cache); let heraer = randomaer * 2 let hercvy = randomcvy * 3 let hercpt = randomcpt * 5 Actions.storeValue(aer, 1, "earcher", cache); Actions.storeValue(cvy, 1, "ecavalry", cache); Actions.storeValue(cpt, 1, "ecatapult", cache); let her = randomswm + heraer + hercvy + hercpt; Actions.storeValue(her, 1, "her", cache); let lose1 = tempVars("swm") - randomswm; let abs1 = Math.abs(lose1); let lose2 = tempVars("aer") - randomaer; let abs2 = Math.abs(lose2); let lose3 = tempVars("cvy") - randomcvy; let abs3 = Math.abs(lose3); let lose4 = tempVars("cpt") - randomcpt; let abs4 = Math.abs(lose4); const losed1 = Math.floor(Math.random() * (lose1 - 0)) + 0; Actions.storeValue(losed1, 1, "losed1", cache); const losed2 = Math.floor(Math.random() * (lose2 - 0)) + 0; Actions.storeValue(losed2, 1, "losed2", cache); const losed3 = Math.floor(Math.random() * (lose3 - 0)) + 0; Actions.storeValue(losed3, 1, "losed3", cache); const losed4 = Math.floor(Math.random() * (lose4 - 0)) + 0; Actions.storeValue(losed4, 1, "losed4", cache); const randomcountry = Math.floor(Math.random() * (3 - 1)) + 1; switch (randomcountry) { case 1: var t = "Byzantium"; break; case 2: var t = "Hungary"; break; } this.storeValue(t, 1, 'country', cache); this.callNextAction(cache) if (me > her) { //if the variable is the value, do this js here (dbm true) const otto = Math.floor(Math.random() * (tempVars("level") * 100 - 1)) + 1; Actions.storeValue(otto, 1, "wotto", cache); const wood = Math.floor(Math.random() * (tempVars("level") * 10 - 1)) + 1; Actions.storeValue(otto, 1, "wwood", cache); const rock = Math.floor(Math.random() * (tempVars("level") * 10 - 1)) + 1; Actions.storeValue(rock, 1, "wrock", cache); const food = Math.floor(Math.random() * (tempVars("level") * 10 - 1)) + 1; Actions.storeValue(food, 1, "wfood", cache); this.callNextAction(cache) } else { let jumpTo = 25 const index = Math.max(jumpTo - 1, 0); cache.index = index - 1; this.callNextAction(cache) } } else { //if the variable isn't the value, do this other js here (dbm false) let jumpTo = 37 const index = Math.max(jumpTo - 1, 0); cache.index = index - 1; this.callNextAction(cache) }