$gold_mod = 0.25; //The Dim Mak takes away 25% of a targets' gold. } else { if ($item->getTurnChange() <= 0) { $turns_change = $item->getTurnChange(); if ($turns_change == 0) { echo 'You fail to take any turns from ' . $target . '.'; } $result = "lose " . -1 * $turns_change . " turns"; changeTurns($target, $turns_change); $victim_alive = true; } else { if ($item->getTurnChange() > 0) { $turns_change = $item->getTurnChange(); $result = "gain {$turns_change} turns"; changeTurns($target, $turns_change); $victim_alive = true; } } } } } } if ($result) { // *** Message to display based on item type *** if ($item->getTargetDamage() > 0) { echo "{$target} takes {$item->getTargetDamage()} damage from your attack!<br><br>\n"; } else { if ($item === $dimMak) { echo "The life force drains from {$target} and they drop dead before your eyes!.<br>\n"; } else {
add_gold($char_id, $loot); addKills($char_id, 1); $added_bounty = floor($level_check / 5); if ($added_bounty > 0) { addBounty($char_id, $added_bounty * 25); } else { // Can only receive bounty if you're not getting it on your own head. if ($bounty = rewardBounty($char_id, $target->vo->player_id)) { $bounty_msg = "You have valiantly slain the wanted criminal, {$target}! For your efforts, you have been awarded {$bounty} gold!"; sendMessage('Village Doshin', $username, $bounty_msg); } } $target_message = "{$attacker_id} has killed you with {$command} and taken {$loot} gold."; send_event($attacker_char_id, $target->id(), $target_message); $attacker_message = "You have killed {$target} with {$command} and taken {$loot} gold."; sendMessage($target->vo->uname, $username, $attacker_message); } } $turns_to_take = $turns_to_take - $turn_cost; if (!$covert && $player->hasStatus(STEALTH)) { $player->subtractStatus(STEALTH); $destealthed = true; } } // End of the skill use SUCCESS block. $ending_turns = changeTurns($attacker_char_id, $turns_to_take); // Take the skill use cost. $target_ending_health = $target->health(); $target_ending_health_percent = $target->health_percent(); $target_name = $target->name(); display_page('skills_mod.tpl', 'Skill Effect', get_defined_vars(), array('quickstat' => 'player'));
sendMessage($attacker_id, $target, $target_message); $attacker_message = "You have killed {$target} with {$command} on {$today} and taken {$loot} gold."; sendMessage($target, $username, $target_message); } else { $loot = 0; echo "You have comitted suicide!<br>\n"; } } $turns_to_take = $turns_to_take - $turn_cost; if (!$covert && getStatus($username) && $status_array['Stealth']) { subtractStatus($username, STEALTH); echo "Your actions have revealed you. You are no longer stealthed.<br>\n"; } } // End of the skill use SUCCESS block. $ending_turns = changeTurns($username, $turns_to_take); ?> <div class="skillReload"> <a href="skills_mod.php?command=<?php echo urlencode($command); ?> &target=<?php echo $target; ?> ">Use <?php echo $command; ?> again.</a> </div> <br>
function subtractTurns($who, $amount) { return changeTurns($who, -1 * $amount); }