本文整理汇总了PHP中Skill::getIgnoreStealth方法的典型用法代码示例。如果您正苦于以下问题:PHP Skill::getIgnoreStealth方法的具体用法?PHP Skill::getIgnoreStealth怎么用?PHP Skill::getIgnoreStealth使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Skill
的用法示例。
在下文中一共展示了Skill::getIgnoreStealth方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: in
die;
}
// Template vars.
$display_sight_table = $generic_skill_result_message = $generic_state_change = $killed_target = $loot = $added_bounty = $bounty = $suicided = $destealthed = null;
//Get filtered info from input.
$target = in('target');
$command = in('command');
$stealth = in('stealth');
$skillListObj = new Skill();
$poisonMaximum = 100;
// *** Before level-based addition.
$poisonMinimum = 1;
$poisonTurnCost = $skillListObj->getTurnCost('poison touch');
// wut
$turn_cost = $skillListObj->getTurnCost(strtolower($command));
$ignores_stealth = $skillListObj->getIgnoreStealth($command);
$self_use = $skillListObj->getSelfUse($command);
$use_on_target = $skillListObj->getUsableOnTarget($command);
$ki_cost = 0;
// Ki taken during use.
$reuse = true;
// Able to reuse the skill.
$today = date("F j, Y, g:i a");
// Check whether the user actually has the needed skill.
$has_skill = $skillListObj->hasSkill($command);
$starting_turn_cost = $turn_cost;
assert($turn_cost >= 0);
$turns_to_take = null;
// *** Even on failure take at least one turn.
$char_id = self_char_id();
$player = new Player($char_id);
示例2: elseif
$simultaneousKill = NULL;
// *** Not simultaneous by default. ***
$stealthAttackDamage = $attacker_str;
$turns_to_take = null;
// *** Even on failure take at least one turn. ***
$attack_type = 'attack';
// *** Default attack category type is single attack. ***
if ($blaze) {
$attack_type = 'blaze';
} elseif ($deflect) {
$attack_type = 'deflect';
} elseif ($duel) {
$attack_type = 'duel';
}
$skillListObj = new Skill();
$ignores_stealth = $skillListObj->getIgnoreStealth($attack_type);
$required_turns = $skillListObj->getTurnCost($attack_type);
// *** Attack Legal section ***
$attacker = $username;
$params = array('required_turns' => $required_turns, 'ignores_stealth' => $ignores_stealth);
assert($attacker != $target);
$AttackLegal = new AttackLegal($attacker, $target, $params);
// *** There's a same-domain problem with this attack-legal now that it's been modified for skills ***
// *** MAIN BATTLE ALGORITHM ***
if (!$AttackLegal->check()) {
// *** Display the reason the attack failed.
echo "<div class='ninja-error centered'>" . $AttackLegal->getError() . "</div>";
} else {
// *** ATTACKING + STEALTHED SECTION ***
if (!$duel && $attacker_status['Stealth']) {
//Not dueling, and attacking from stealth
示例3: Player
}
if ($evade) {
$attack_type['evade'] = 'evade';
}
if ($duel) {
$attack_type['duel'] = 'duel';
} else {
$attack_type['attack'] = 'attack';
}
$target_player = new Player($target);
$attacking_player = new Player(self_char_id());
$attacker = $attacking_player->name();
$skillListObj = new Skill();
$ignores_stealth = false;
foreach ($attack_type as $type) {
$ignores_stealth = $ignores_stealth || $skillListObj->getIgnoreStealth($type);
$required_turns += $skillListObj->getTurnCost($type);
}
// *** Attack Legal section ***
$params = array('required_turns' => $required_turns, 'ignores_stealth' => $ignores_stealth);
$attack_legal = new AttackLegal($attacking_player, $target_player, $params);
$attack_is_legal = $attack_legal->check();
$attack_error = $attack_legal->getError();
// *** MAIN BATTLE ALGORITHM ***
if ($attack_is_legal) {
// *** Target's stats. ***
$target_health = $target_player->health;
$target_level = $target_player->level;
$target_str = $target_player->getStrength();
// *** Attacker's stats. ***
$attacker_health = $attacking_player->health;