Transaction

70b45f5a6cc076f90f5f9dff0e6b1000c26ecd2e757a357c55045dacf0f67df7
( - )
208,155
2021-01-13 05:36:11
1
3,147 B

3 Outputs

Total Output:
  • jrun cryptofightsMG {"in":0,"ref":["8e5d26176cc5ce4f2734e2fb8abb6da01237f5c1736839adf8a82659ecbe85d6_o1","0e660dbbccc19c47e388dbd07832821da0083f020eced33c3f49d195df5427bc_o1","507b9cffbeb94c2386e054f3d63617f7b091e0bdb1619a99c3cd04e309be45f3_o1"],"out":["8a44fdf4138bc33727df9e491ecae4bfaeb24ef3c9b795b474505e9ba19ed0bd"],"del":[],"cre":["n2Bd4cWhEQK1aVjb1R7EBGV9mrw3etvSdC"],"exec":[{"op":"DEPLOY","data":["class Heal extends KronoClass {\n static run(battle, state, dice, ts) {\n const {Ability, SkillType} = Constants;\n var playerName = BattleUtils.getPrettifiedPlayerName(battle, state);\n let log = `${playerName} uses <sprite name=\"${BattleUtils.parseSkillName(SkillType.Heal)}\">${BattleUtils.parseSkillName(SkillType.Heal)}\\n`;\n\n state.actionLogs.push(this.apply(battle, state, dice, 1, 8, Ability.Intelligence, log));\n\n return BattleUtils.endTurn(battle, state, dice);\n }\n\n\n static apply(battle, state, dice, diceCount, diceFaces, ability, log) {\n const {Outcome, SkillType} = Constants;\n let rolls = [];\n let nativeRoll = dice.roll(diceCount, diceFaces);\n rolls.push({\n type: diceFaces,\n ability: ability,\n size: diceFaces,\n value: nativeRoll\n });\n\n const defenderState = state.fighterStates[state.playerToAct ? 0 : 1];\n const attackerState = state.fighterStates[state.playerToAct];\n\n let playerName = BattleUtils.getPrettifiedPlayerName(battle, state);\n\n let healAmount = nativeRoll + attackerState.modifiers[ability];\n\n if (attackerState.hp + healAmount > attackerState.maxHP) {\n healAmount = (attackerState.maxHP - attackerState.hp);\n }\n\n attackerState.hp += healAmount;\n\n log += `${playerName} heals : ${healAmount}\\n`;\n\n return {\n playerIndex: state.playerToAct,\n skillType: SkillType.Heal,\n results: [{\n rolls: rolls,\n outcome: Outcome.Success,\n damageOutput: [\n {\n damage: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n defenderHp: defenderState.hp,\n defenderReduction: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n }\n ],\n effectDurationsIncrement: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n hpIncrement: healAmount,\n attackerHp: attackerState.hp\n }],\n actionLogMessage: log\n };\n\n }\n}",{"affectsOpponent":false,"deps":{"BattleUtils":{"$jig":0},"Constants":{"$jig":1},"KronoClass":{"$jig":2}},"description":"Heal Action","displayName":"Heal","handle":"heal","hash":"d8abfe005ccef5243ae7b2dfae8bce87b7db9d71f9a5498e31f2468d725d63df","isAttackAction":false,"requiredLevel":0,"skillType":7}]}]}
    https://whatsonchain.com/tx/70b45f5a6cc076f90f5f9dff0e6b1000c26ecd2e757a357c55045dacf0f67df7