berserk()

From Hack Wars Wiki

Jump to: navigation, search


Function information for berserk()
Function berserk()
API Attacking
Cost $1500
Level 40
CPU Usage 5
Description Performs a double attack, but also hurts your own port.


Additional Info

Normally, your port will take one action during a combat round. Berserk makes it take two, in exchange for harming yourself. The recoil damage is unsoakable, so it will *always* be half your base damage.

example:

  • You have any firewall, and your attack berserks on every attack
  • Base Damage = 10
  • Enemy has a PortProtector (avg. soak of 15%)
  • Avg Damage Done Per Hit = 8.5
  • Damage From Berserking = 5
  • Avg Damage Done (2 hits) = 17

Basic Attack Example

berserk();


If placed in the continue event of an attack script would make each hit deal double damage. However, using berserk in this way puts your system/port at a greater risk of overheating.

Advanced Attack Example

Controlling how and when berserk is called in your attack script is quite important. Not only will it stop it from being called when your near to overheating, but also give you a small advantage over the other player:

if(getCPULoad()/getMaximumCPULoad() < 0.8){
   berserk();
}


If placed in the continue event of your attack script would only use berserk if your CPU load is less than 80 percent and therefore, preventing it from overheating your system.

Personal tools