DeploySEALED
@!●▓@░#╱*█%░▓◆~○▪$░▒$◆#&╳○░@▓!○!○^▫$*▓%▓%╲▓╱$◇╲!█╱#▓~●○▫○╱▓▫█▫~◇
Transaction ID
Execution Fee
0.00000334 FLOWTransaction Summary
DeployContract deployment
Contract deployment
Script Arguments
0nameString
ArenaBoyzGlobals
1codeString
pub contract ArenaBoyzGlobals {
pub var targetables_start : UInt8
pub var hp_base : UInt16
pub var damage_base: UInt16
pub var defense_base: UInt16
pub var accuracy_base: UInt16
pub var speed_base: UInt16
pub var counter_base: UInt16
pub var turns_per_circle: UInt32
pub var ar_start: UInt8
pub var sniper_start: UInt8
pub var smg_start: UInt8
pub var shotgun_start: UInt8
pub var throwable_start: UInt8
pub var healing_start: UInt8
pub var shield_start: UInt8
pub var stim_start: UInt8
pub var medal_start: UInt8
pub var damage_start: UInt8
pub var defense_start: UInt8
pub var accuracy_start: UInt8
pub var speed_start: UInt8
pub var counter_start: UInt8
pub var items_end: UInt8
pub var effective_item_max: Int
pub var heal_per_level : UInt16
pub var throwable_damage_per_level: UInt16
pub var shield_per_level : UInt16
pub var stim_per_level : UFix64
pub var medal_max_hp_per_level : UInt16
pub var free_max_hp_per_level : UInt16
pub var targetable_bonus_per_level : UInt16
pub var equipment_bonus_per_level : UInt16
pub var primary_bonus_per_thresh : UInt16
pub var threshhold_amount : UInt16
pub var minimum_damage_divisor : UInt16
pub var heroes_per_pod : UInt32
pub var scavenge_pool_0: [UInt8; 32]
pub var scavenge_pool_1: [UInt8; 32]
pub var scavenge_pool_2: [UInt8; 32]
pub var scavenge_pool_3: [UInt8; 32]
pub var scavenge_pool_4: [UInt8; 32]
pub var scavenge_pool_5: [UInt8; 32]
pub var scavenge_pool_6: [UInt8; 32]
pub var starting_primary_pool: [UInt8; 4]
pub var seconds_per_turn : Int
init() {
self.heroes_per_pod = 4 //number of heroes that are in a pod, which is a group that can interact with eachother
self.effective_item_max = 12 //number of items a hero can hold in inventory. they can actually hold twice as many as this, but the other items dont do anything and will be dropped at end of turn
self.targetables_start = 33 //this is what item index the primary weapons stop at and targetable items start at
self.hp_base = 875 //starting hp, some randomity is applied, usually 10-20%, see the contract under GenerateHero
self.damage_base = 375 //starting damage
self.defense_base = 200 //starting
self.accuracy_base = 200 //starting
self.speed_base = 200 //starting
self.counter_base = 200 //starting
self.turns_per_circle = 3 //how many turns pass before the scavenge pool is refreshed and heroes are healed back to max_hitpoints
self.ar_start = 1 //what item index ars start at
self.sniper_start = 9 //item index sniper rifles start at
self.smg_start = 17 //smgs
self.shotgun_start = 25 //shotguns
self.throwable_start = 33 //what item index throwables start at specifically, not just targetables above
self.healing_start = 41 //what item index healing starts at
self.shield_start = 49 //shields
self.stim_start = 57 //stims
self.medal_start = 65 //medals
self.damage_start = 73 //item index damage equipment starts at, this is not a throwable and is a permanent item
self.defense_start = 81 //defense equipment
self.accuracy_start = 89 //accuracy equipment
self.speed_start = 97 //speed equipment
self.counter_start = 105 //counter equipment
self.items_end = 113 //all items end here for now
self.heal_per_level = 100 //how much healing targetables heal per level. so a level 1 healing heals 200, a level 5 healing heals 1000
self.throwable_damage_per_level = 200 //how much damage throwables like grenades do per level. so a level 1 knives do 200, a level 5 disposable laser or whatever does 1000
self.shield_per_level = 100 //this will be how much shields are granted by shields, shields are temp and are removed at end of turn
self.stim_per_level = 0.5 //stim is bonus mult to stats gained from attack bonus
self.medal_max_hp_per_level = 65 //medal is bonus HP granted at end of POD, not end of level.
self.free_max_hp_per_level = 65 //this is free HP granted at end of POD
self.targetable_bonus_per_level = 10 //this is how much a targetable ALSO grants you per bonus if you hold it at end of POD before it is deleted, per level. so a level 5 disposable laser also gives you 50 whatever at end of POD
self.equipment_bonus_per_level = 20 //this is how much equipment grants just from holding it at any time, per level
self.primary_bonus_per_thresh = 3 //this is how much extra damage you are granted per threshold level exceeded per level. so a level 3 primary gives you 15 per 50 in primary stat.
self.threshhold_amount = 25 //this is the threshold level, so the 50 above is the 50 here.
self.minimum_damage_divisor = 5 //20% this is hard to explain but the minimum amount of damage that any attack can do is 20% of the attacker's total damage, regardless of target defense. we mod this divisor to change it from 20%
self.seconds_per_turn = 70 //how long a player is given to take their turn
self.scavenge_pool_0 = [2,10,18,26,34,42,50,66,74,82,90,98,106,1,9,17,25,33,41,49,65,73,81,89,97,105,0,0,0,0,0,0] //scavenge pool item index numbers
self.scavenge_pool_1 = [3,11,19,27,35,43,51,67,75,83,91,99,107,2,10,18,26,34,42,50,66,74,82,90,98,106,0,0,0,0,0,0] //stims are current removed
self.scavenge_pool_2 = [4,12,20,28,36,44,52,68,76,84,92,100,108,3,11,19,27,35,43,51,67,75,83,91,99,107,0,0,0,0,0,0] //from testnet
self.scavenge_pool_3 = [5,13,21,29,37,45,53,69,77,85,93,101,109,4,12,20,28,36,44,52,68,76,84,92,100,108,0,0,0,0,0,0]
self.scavenge_pool_4 = [6,14,22,30,38,46,54,70,78,86,94,102,110,5,13,21,29,37,45,53,69,77,85,93,101,109,0,0,0,0,0,0]
self.scavenge_pool_5 = [7,15,23,31,39,47,55,71,79,87,95,103,111,6,14,22,30,38,46,54,70,78,86,94,102,110,0,0,0,0,0,0]
self.scavenge_pool_6 = [8,16,24,32,40,48,56,72,80,88,96,104,112,7,15,23,31,39,47,55,71,79,87,95,103,111,0,0,0,0,0,0]
self.starting_primary_pool = [1,9,17,25] //what items can heroes roll at random in their starting kit goes here, they only get one of these at present and they are all primaries.
}
access(self) fun isOwner(): Bool {
return true
}
pub fun getScavengePool7(): [UInt8; 32] {
return [8,16,24,32,40,39,56,72,80,88,96,104,112,7,15,23,31,39,38,55,71,79,87,95,103,111,0,0,0,0,0,0]
}
pub fun setDamageBase(newDamageBase: UInt16) {
pre {
self.isOwner(): "Only the contract owner can update this value"
}
self.damage_base = newDamageBase
}
pub fun setDefenseBase(newDefenseBase: UInt16) {
pre {
self.isOwner(): "Only the contract owner can update this value"
}
self.defense_base = newDefenseBase
}
pub fun setSecondsPerTurn(newTurnLength: Int) {
pre {
self.isOwner(): "Only the contract owner can update this value"
}
self.seconds_per_turn = newTurnLength
}
pub fun setTurnsPerCircle(newTurnsPerCircle: UInt32) {
pre {
self.isOwner(): "Only the contract owner can update this value"
}
self.turns_per_circle = newTurnsPerCircle
}
pub fun setEquipmentBonusPerLevel(newEquipmentBonus: UInt16) {
pre {
self.isOwner(): "Only the contract owner can update this value"
}
self.equipment_bonus_per_level = newEquipmentBonus
}
pub fun setShieldPerLevel(newShieldPerLevel: UInt16) {
pre {
self.isOwner(): "Only the contract owner can update this value"
}
self.shield_per_level = newShieldPerLevel
}
pub fun setHealPerLevel(newHealPerLevel: UInt16) {
pre {
self.isOwner(): "Only the contract owner can update this value"
}
self.heal_per_level = newHealPerLevel
}
pub fun setMedalMaxPerLevel(newMedalMaxPerLevel: UInt16) {
pre {
self.isOwner(): "Only the contract owner can update this value"
}
self.medal_max_hp_per_level = newMedalMaxPerLevel
}
pub fun setFreeMaxHpPerLevel(newFreeMaxHpPerLevel: UInt16) {
pre {
self.isOwner(): "Only the contract owner can update this value"
}
self.free_max_hp_per_level = newFreeMaxHpPerLevel
}
pub fun setThreshholdAmount(newThreshholdAmount: UInt16) {
pre {
self.isOwner(): "Only the contract owner can update this value"
}
self.threshhold_amount = newThreshholdAmount
}
pub fun setPrimaryBonusPerThresh(newPrimaryBonus: UInt16) {
pre {
self.isOwner(): "Only the contract owner can update this value"
}
self.primary_bonus_per_thresh = newPrimaryBonus
}
pub fun setHeroesPerPod(newHeroesPerPod: UInt32) {
pre {
self.isOwner(): "Only the contract owner can update this value"
}
self.heroes_per_pod = newHeroesPerPod
}
pub fun SetScavengePool(index: Int, pool: [UInt8; 32]) {
if index == 0 {
self.scavenge_pool_0 = pool
} else if index == 1 {
self.scavenge_pool_1 = pool
} else if index == 2 {
self.scavenge_pool_2 = pool
} else if index == 3 {
self.scavenge_pool_3 = pool
} else if index == 4 {
self.scavenge_pool_4 = pool
} else if index == 5 {
self.scavenge_pool_5 = pool
} else if index == 6 {
self.scavenge_pool_6 = pool
} else {
panic("Invalid scavenge pool index")
}
}
}
Cadence Script
1transaction(name: String, code: String ) {
2 prepare(signer: AuthAccount) {
3 signer.contracts.add(name: name, code: code.utf8 )
4 }
5 }