~armagetronad-ap/armagetronad/BattleMania

« back to all changes in this revision

Viewing changes to src/special/ktk/interact.php

  • Committer: zodiacsohma1 at gmail
  • Date: 2014-03-07 04:20:29 UTC
  • Revision ID: zodiacsohma1@gmail.com-20140307042029-34oc5evovei40uik
Added #death_time variable to cycle.php
Renamed Attack functions to suitable names which make better sense and purpose.
Renamed KillTheKingInteract function to KillTheKingInteractAllowed for purposeful definition.
Renamed RandomColors function to RandomColorsRGB for purposeful definition.
Changed the integer value of DELAY_COMMAND function to float value.
Used BridgePieces function in config.php to grab values.
Simplify the chat string in chat.php for script memory check.

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
    );
12
12
};
13
13
 
14
 
function KillTheKingInteract(Player $attacker, Player $target, Attack $attack)
 
14
function KillTheKingInteractAllowed(Player $attacker, Player $target, Attack $attack)
15
15
{
16
16
    //  allow certain attacks to function
17
17
    if ($attack->log == "healing_wave") return false;
22
22
        $attackers_list = KillTheKingAttack::$types[$attacker->ktk_tp->type];
23
23
        foreach ($attackers_list as $type_num)
24
24
            if ($type_num == $target->ktk_tp->type)
25
 
                return true;
 
25
                return false;
26
26
    }
27
27
 
28
 
    return false;
 
28
    return true;
29
29
}