modding:function:objprogramdamage
This is an old revision of the document!
objProgramDamage
Syntax | (objProgramDamage obj hacker progName aiLevel code) → True/Nil |
---|---|
Arguments | obj: The ship that will receive a cyberattack |
hacker: The object carrying out the cyberattack | |
progName: The name that shows up when the obj detects the attack. | |
aiLevel: The strength of the cyberattack. | |
code: A segment of code that will be evaluated if the cyberattack is successful | |
Returns | True if the cyberattack succeeds. Nil otherwise |
Category | spaceObject functions |
Description | Makes an object carry out a cyberattack against a ship. Success depends on the difference between aiLevel and the target's cyberDefenseLevel. The code will not be evaluated if the cyberattack fails. |
Success rate is 90% plus 10% for each level that the aiLevel is greater than the target's cyberDefenseLevel. If the cyberattack succeeds, the hacker is highlighted on the target's SRS for 200 ticks (6.66 seconds) and the target receives a message consisting of “cyberattack detected: ” followed by progName.
Example
(block (target)
Returns 'ready if autopilot is installed on the playership.
Return to Space Object functions list
Return to functions list
modding/function/objprogramdamage.1486253876.txt.gz · Last modified: 2017/02/05 00:17 by 0xabcdef