mecha
Vars | |
combat_health | The mech's health in battle |
---|---|
cooldown | Cooldown between play sessions |
cooldown_multiplier | Cooldown multiplier after a battle (by default: battle cooldowns are 30 seconds) |
in_combat | TRUE = in combat currently || FALSE = Not in combat |
losses | ...And their loss count in combat |
max_combat_health | The mech's max combat health |
quiet | If it makes noise when played with |
special_attack_charged | TRUE = the special attack is charged || FALSE = not charged |
special_attack_cooldown | Current cooldown of their special attack |
special_attack_cry | The battlecry when using the special attack |
special_attack_type | What type of special attack they use - SPECIAL_ATTACK_DAMAGE, SPECIAL_ATTACK_HEAL, SPECIAL_ATTACK_UTILITY, SPECIAL_ATTACK_OTHER |
special_attack_type_message | What message their special move gets on examining |
timer | Timer when it'll be off cooldown |
wants_to_battle | TRUE = Offering battle to someone || FALSE = Not offering battle |
wins | This mech's win count in combat |
Procs | |
attack | Attack is called from the user's toy, aimed at target(another human), checking for target's toy. |
attack_tk | Overrides attack_tk - Sorry, you have to be face to face to initiate a battle, it's good sportsmanship |
attackby | If you attack a mech with a mech, initiate combat between them |
check_battle_start | This proc checks if a battle can be initiated between src and attacker. |
combat_sleep | this proc combines "sleep" while also checking for if the battle should continue |
mecha_brawl | The 'master' proc of the mech battle. Processes the entire battle's events and makes sure it start and finishes correctly. |
special_attack_move | Processes any special attack moves that happen in the battle (called in the mechaBattle proc). |
suicide_act | Starts a battle, toy mech vs player. Player... doesn't win. |
super_special_attack | Base proc for 'other' special attack moves. |
withdraw_offer | Resets the request for battle. |
Var Details
combat_health
The mech's health in battle
cooldown
Cooldown between play sessions
cooldown_multiplier
Cooldown multiplier after a battle (by default: battle cooldowns are 30 seconds)
in_combat
TRUE = in combat currently || FALSE = Not in combat
losses
...And their loss count in combat
max_combat_health
The mech's max combat health
quiet
If it makes noise when played with
special_attack_charged
TRUE = the special attack is charged || FALSE = not charged
special_attack_cooldown
Current cooldown of their special attack
special_attack_cry
The battlecry when using the special attack
special_attack_type
What type of special attack they use - SPECIAL_ATTACK_DAMAGE, SPECIAL_ATTACK_HEAL, SPECIAL_ATTACK_UTILITY, SPECIAL_ATTACK_OTHER
special_attack_type_message
What message their special move gets on examining
timer
Timer when it'll be off cooldown
wants_to_battle
TRUE = Offering battle to someone || FALSE = Not offering battle
wins
This mech's win count in combat
Proc Details
attack
Attack is called from the user's toy, aimed at target(another human), checking for target's toy.
attack_tk
Overrides attack_tk - Sorry, you have to be face to face to initiate a battle, it's good sportsmanship
attackby
If you attack a mech with a mech, initiate combat between them
check_battle_start
This proc checks if a battle can be initiated between src and attacker.
Both SRC and attacker (if attacker is included) timers are checked if they're on cooldown, and both SRC and attacker (if attacker is included) are checked if they are in combat already. If any of the above are true, the proc returns FALSE and sends a message to user (and target, if included) otherwise, it returns TRUE Arguments:
- user: the user who is initiating the battle
- attacker: optional arg for checking two mechs at once
- target: optional arg used in Mech PvP battles (if used, attacker is target's toy)
combat_sleep
this proc combines "sleep" while also checking for if the battle should continue
this goes through some of the checks - the toys need to be next to each other to fight! if it's player vs themself: They need to be able to "control" both mechs (either must be adjacent or using TK) if it's player vs player: Both players need to be able to "control" their mechs (either must be adjacent or using TK) if it's player vs mech (suicide): the mech needs to be in range of the player if all the checks are TRUE, it does the sleeps, and returns TRUE. Otherwise, it returns FALSE. Arguments:
- delay - the amount of time the sleep at the end of the check will sleep for
- attacker - the attacking toy in the battle.
- attacker_controller - the controller of the attacking toy. there should ALWAYS be an attacker_controller
- opponent - (optional) the defender controller in the battle, for PvP
mecha_brawl
The 'master' proc of the mech battle. Processes the entire battle's events and makes sure it start and finishes correctly.
src is the defending toy, and the battle proc is called on it to begin the battle. After going through a few checks at the beginning to ensure the battle can start properly, the battle begins a loop that lasts until either toy has no more health. During this loop, it also ensures the mechs stay in combat range of each other. It will then randomly decide attacks for each toy, occasionally making one or the other use their special attack. When either mech has no more health, the loop ends, and it displays the victor and the loser while updating their stats and resetting them. Arguments:
- attacker - the attacking toy, the toy in the attacker_controller's hands
- attacker_controller - the user, the one who is holding the toys / controlling the fight
- opponent - optional arg used in Mech PvP battles: the other person who is taking part in the fight (controls src)
special_attack_move
Processes any special attack moves that happen in the battle (called in the mechaBattle proc).
Makes the toy shout their special attack cry and updates its cooldown. Then, does the special attack. Arguments:
- victim - the toy being hit by the special move
suicide_act
Starts a battle, toy mech vs player. Player... doesn't win.
super_special_attack
Base proc for 'other' special attack moves.
This one is only for inheritance, each mech with an 'other' type move has their procs below. Arguments:
- victim - the toy being hit by the super special move (doesn't necessarily need to be used)
withdraw_offer
Resets the request for battle.
For use in a timer, this proc resets the wants_to_battle variable after a short period. Arguments:
- user - the user wanting to do battle