#include <sys/types.h>
#include <stdio.h>
#include <string.h>
#include <time.h>
#include "merc.h"
#include "interp.h"
#include "magic.h"
#define WAR_SOMER 1
#define WAR_REVERSE 2
#define WAR_KNEEL 3
#define WAR_JAB 4
#define WAR_HIGH 5
#define WAR_UPPER 6
#define WAR_BUTTER 7
#define WAR_CROSS 8
#define WAR_FORWARD 9
#define WAR_CIRCLE 10
/*
* Warrior Combo Movelist
*
* Move name Command Damage Dam types Affect
* ------------------------------------------------------------------------------------
* Somersault slash do_somer weapon * 2 Slash
* Reverse Spin strike do_revserse_spin weapon *1.5 Slash
* Kneel strike do_kneel_strike weapon *1.25 Pierce
* Jab do_jab weapon Pierce
* High strike do_high_strike weapon *1.5 Pierce
* Uppercut slash do_uppercut_slash weapon * 2 Slash
* Butterfly slice do_butterfly_slice weapon * 2 Slash
* Cross slash do_cross_slash weapon *1.5 Slash
* Forward Slash do_forward_slash weapon *1.25 Slash
* Reverse Circle do_reverse_circle weapon * 3 Slice
*
*
* Combo List:
*
* Combo Name: Desc: Commands
* -------------------------------------------------------------------------------------
* Jab Furry: Highstrike, Jab, Highstrike, Jab
* Knight's revenge Reverse spin, High strike, Butterfly, Kneel
* Reversal Somersault, Reverse spin, Jab, Forward, Jab, Reverse spin, reverse circle
* Counter reversal Reverse circle, Jab, Jab, Forward, Jab, Reverse spin, somersault
* Decapitation Kneel, Kneel, Reverse spin, Butterfly, High strike
* Call of the Furies Uppercut, Butterfly, Cross, cross, Jab, jab, jab
* Obliteration Reverse circle, Forward, forward, cross, cross, reversed circle, Uppercut
* Knock Knock Jab, Jab, Jab, Jab, Jab, Reverse circle
* Shield Breaker Uppercut, butterfly, kneel, jab, somersault
*
*/
void war_check_combo (CHAR_DATA * ch, CHAR_DATA * victim, int current_move)
{
int dam = -1;
OBJ_DATA * wield = get_eq_char (ch, WEAR_WIELD);
int sn = get_weapon_sn (ch);
int skill = 20 + get_weapon_skill (ch, sn);
war_place_moves_in_list (ch, current_move);
/*
char buf[MSL];
sprintf(buf, "warcombo[1] = %s\n", war_get_move_name(ch->warcombo[1]));
send_to_char(buf, ch);
sprintf(buf, "warcombo[2] = %s\n", war_get_move_name(ch->warcombo[2]));
send_to_char(buf, ch);
sprintf(buf, "warcombo[3] = %s\n", war_get_move_name(ch->warcombo[3]));
send_to_char(buf, ch);
sprintf(buf, "warcombo[4] = %s\n", war_get_move_name(ch->warcombo[4]));
send_to_char(buf, ch);
sprintf(buf, "warcombo[5] = %s\n", war_get_move_name(ch->warcombo[5]));
send_to_char(buf, ch);
sprintf(buf, "warcombo[6] = %s\n", war_get_move_name(ch->warcombo[6]));
send_to_char(buf, ch);
sprintf(buf, "warcombo[7] = %s\n", war_get_move_name(ch->warcombo[7]));
send_to_char(buf, ch);
*/
// Furry of Jabs
if (ch->warcombo[1] == WAR_JAB
&& ch->warcombo[2] == WAR_HIGH
&& ch->warcombo[3] == WAR_JAB
&& ch->warcombo[4] == WAR_HIGH)
{
act ("{R\nYou unleash a furry of jabs on $N!{x\n", ch, NULL, victim, TO_CHAR);
act ("{R\n$n unleashes a furry of jabs on you!{x", ch, NULL, victim, TO_VICT);
act ("{R\n$n unleaches a furry of jabs on $N!{x\n", ch, NULL, victim, TO_NOTVICT);
do_function (ch, &do_stab, "");
do_function (ch, &do_stab, "");
wait_function (ch, 1, &do_stab, "");
wait_function (ch, 3, &do_stab, "");
wait_function (ch, number_range (5, 7), &do_stab, "");
ch->wait = 12;
war_reset_combo (ch);
return;
}
// Knight's revenge
// Reverse spin, High strike, Butterfly, Kneel
if (ch->warcombo[1] == WAR_KNEEL
&& ch->warcombo[2] == WAR_BUTTER
&& ch->warcombo[3] == WAR_HIGH
&& ch->warcombo[4] == WAR_REVERSE)
{
if ((get_skill (ch, gsn_knight_revenge)) > number_percent ())
{
sn = skill_lookup ("The Knights Revenge");
dam = (victim->max_hit / 20);
act ("{R\nYou kneel before $N, then stab $E in the chest!{x\n", ch, NULL, victim, TO_CHAR);
act ("{R\n$n kneels before you, then stabs you in the chest!{x", ch, NULL, victim, TO_VICT);
act ("{R\n$n kneels before $N, then stabs $E him the chest!{x\n", ch, NULL, victim, TO_NOTVICT);
damage (ch, victim, dam, sn, DAM_NONE, TRUE, TRUE);
ch->wait = 12;
check_improve (ch, gsn_knight_revenge, TRUE, 5);
war_reset_combo (ch);
return;
}
else
{
sn = skill_lookup ("The Knight's Revenge");
dam = 0;
act ("{R\nYou kneel before $N, and try to stab $E in the chest, but he sees it comming!{x\n", ch, NULL, victim, TO_CHAR);
act ("{R\n$n kneels before you, and attempts to stab you, but you see it comming and parry his attack!{x", ch, NULL, victim, TO_VICT);
act ("{R\n$n kneels before, but $N sees the attempt and parries $n's attack!{x\n", ch, NULL, victim, TO_NOTVICT);
damage (ch, victim, dam, sn, DAM_NONE, TRUE, TRUE);
ch->wait = 12;
check_improve (ch, gsn_knight_revenge, FALSE, 5);
war_reset_combo (ch);
return;
}
}
// Reversal
// Somersault, Reverse spin, Jab, Forward, Jab, Reverse spin, reverse circle
if (ch->warcombo[1] == WAR_CIRCLE
&& ch->warcombo[2] == WAR_REVERSE
&& ch->warcombo[3] == WAR_JAB
&& ch->warcombo[4] == WAR_FORWARD
&& ch->warcombo[5] == WAR_JAB
&& ch->warcombo[6] == WAR_REVERSE
&& ch->warcombo[7] == WAR_SOMER)
{
if ((get_skill (ch, gsn_reversal)) > number_percent ())
{
sn = skill_lookup ("Reversal");
dam = number_range (wield->value[1] * skill / 100, wield->value[2] * skill / 100);
dam *= 5;
dam += GET_DAMROLL (ch);
act ("{R\nYou you catch $N offguard and reverse your attack!{x\n", ch, NULL, victim, TO_CHAR);
act ("{R\n$n catchs you offguard, and reverses $E attack!{x", ch, NULL, victim, TO_VICT);
act ("{R\n$n catches $N off guard, and reverses $e attack!{x\n", ch, NULL, victim, TO_NOTVICT);
damage (ch, victim, dam, sn, DAM_NONE, TRUE, TRUE);
ch->wait = 12;
check_improve (ch, gsn_reversal, TRUE, 5);
war_reset_combo (ch);
return;
}
else
{
sn = skill_lookup ("Reversal");
dam = number_range (0, 0);
dam += GET_DAMROLL (ch);
act ("{R\nYou you attempt to catch $N offguard and reverse your attack! But fails!{x\n", ch, NULL, victim, TO_CHAR);
act ("{R\n$n attempts to catch you offguard, and reverses $E attack, but fails!{x", ch, NULL, victim, TO_VICT);
act ("{R\n$n attempts to catche $N off guard, and reverses $e attack, but fails!{x\n", ch, NULL, victim, TO_NOTVICT);
damage (ch, victim, dam, sn, DAM_NONE, TRUE, TRUE);
ch->wait = 12;
check_improve (ch, gsn_reversal, FALSE, 5);
war_reset_combo (ch);
return;
}
}
// Counter Reversal
// Reverse circle, Jab, Jab, Forward, Jab, Reverse spin, somersault
if (ch->warcombo[1] == WAR_SOMER
&& ch->warcombo[2] == WAR_REVERSE
&& ch->warcombo[3] == WAR_JAB
&& ch->warcombo[4] == WAR_FORWARD
&& ch->warcombo[5] == WAR_JAB
&& ch->warcombo[6] == WAR_REVERSE && ch->warcombo[7] == WAR_CIRCLE)
{
if ((get_skill (ch, gsn_counter_reversal)) > number_percent ())
{
sn = skill_lookup ("Counter Reversal");
dam = number_range (wield->value[1] * skill / 100, wield->value[2] * skill / 100);
dam *= 2;
dam += GET_DAMROLL (ch);
act ("{R\nYou you catch $N offguard and reverse your attack!{x\n", ch, NULL, victim, TO_CHAR);
act ("{R\n$n catchs you offguard, and reverses $E attack!{x", ch, NULL, victim, TO_VICT);
act ("{R\n$n catches $N off guard, and reverses $e attack!{x\n", ch, NULL, victim, TO_NOTVICT);
damage (ch, victim, dam, sn, DAM_NONE, TRUE, TRUE);
damage (ch, victim, dam, sn, DAM_NONE, TRUE, TRUE);
damage (ch, victim, dam, sn, DAM_NONE, TRUE, TRUE);
ch->wait = 12;
check_improve (ch, gsn_counter_reversal, TRUE, 5);
war_reset_combo (ch);
return;
}
else
{
sn = skill_lookup ("Counter Reversal");
dam = number_range (0, 0);
dam += GET_DAMROLL (ch);
act ("{R\nYou attempt to catch $N offguard, but fail!{x\n", ch, NULL, victim, TO_CHAR);
act ("{R\n$n attempts to catch you offguard but fails!{x",
ch, NULL, victim, TO_VICT);
act ("{R\n$n attempts to catch $N offguard, but fails!{x\n", ch, NULL, victim, TO_NOTVICT);
damage (ch, victim, dam, sn, DAM_NONE, TRUE, TRUE);
ch->wait = 12;
war_reset_combo (ch);
check_improve (ch, gsn_counter_reversal, FALSE, 5);
return;
}
}
// Decapitation
// Kneel, Kneel, Reverse spin, Butterfly, High strike
if (ch->warcombo[1] == WAR_HIGH
&& ch->warcombo[2] == WAR_BUTTER
&& ch->warcombo[3] == WAR_REVERSE
&& ch->warcombo[4] == WAR_KNEEL
&& ch->warcombo[5] == WAR_KNEEL)
{
if ((get_skill (ch, gsn_decapitation) / 2) > number_percent ())
{
sn = skill_lookup ("Decapitation");
dam = victim->max_hit + 5000;
act ("{R\nYou you deliver a skillful blow and decapitate $N{x\n", ch, NULL, victim, TO_CHAR);
act ("{R\n$n delivers a skillful blow, and decapitates you!{x", ch, NULL, victim, TO_VICT);
act ("{R\n$n delivers a skullful blow to $N, and decapitates $E!{x\n", ch, NULL, victim, TO_NOTVICT);
damage (ch, victim, dam, sn, DAM_NONE, TRUE, TRUE);
ch->wait = 12;
war_reset_combo (ch);
check_improve (ch, gsn_decapitation, TRUE, 5);
return;
}
else
{
sn = skill_lookup ("Decapitation attempt");
dam = number_range (100, 250);
dam += GET_DAMROLL (ch);
act ("{R\nYou you attempt to decapitate $N but miss!{x\n",
ch, NULL, victim, TO_CHAR);
act ("{R\n$n attempts to decapitate you, but misses!{x", ch,
NULL, victim, TO_VICT);
act ("{R\n$n catches $N off guard, and reverses $e attack!{x\n", ch, NULL, victim, TO_NOTVICT);
damage (ch, victim, dam, sn, DAM_NONE, TRUE, TRUE);
ch->wait = 24;
war_reset_combo (ch);
check_improve (ch, gsn_decapitation, FALSE, 5);
return;
}
}
// Call of the Furies
// Uppercut, Butterfly, Cross, cross, Jab, jab, jab
if (ch->warcombo[1] == WAR_JAB
&& ch->warcombo[2] == WAR_JAB
&& ch->warcombo[3] == WAR_JAB
&& ch->warcombo[4] == WAR_CROSS
&& ch->warcombo[5] == WAR_CROSS
&& ch->warcombo[6] == WAR_BUTTER
&& ch->warcombo[7] == WAR_UPPER)
{
if ((get_skill (ch, gsn_call_of_furies)) > number_percent ())
{
sn = skill_lookup ("Call of the Furies");
dam = number_range (500, 1000);
act ("{R\nYou call apon the Furies and Strike $N down!\n",
ch, NULL, victim, TO_CHAR);
act ("{R\n$n calls apon the Furies to strike you down!{x",
ch, NULL, victim, TO_VICT);
act ("{R\n$n calls apon the Furies to strike $N down!{x\n", ch, NULL, victim, TO_NOTVICT);
damage (ch, victim, dam, sn, DAM_NONE, TRUE, TRUE);
ch->wait = 16;
war_reset_combo (ch);
check_improve (ch, gsn_call_of_furies, TRUE, 5);
return;
}
else
{
sn = skill_lookup ("Call of the Furies");
dam = number_range (100, 400);
dam += GET_DAMROLL (ch);
act ("{R\nYou call apon the Furies and Strike $N down!\n",
ch, NULL, victim, TO_CHAR);
act ("{R\n$n calls apon the Furies to strike you down!{x\n", ch, NULL, victim, TO_VICT);
act ("{R\n$n calls apon the Furies to strike $N down!{x\n", ch, NULL, victim, TO_NOTVICT);
damage (ch, victim, dam, sn, DAM_NONE, TRUE, TRUE);
ch->wait = 12;
war_reset_combo (ch);
check_improve (ch, gsn_call_of_furies, FALSE, 5);
return;
}
}
}
/*
* war_get_move_name()
*
* Used for debugging, prints out the name
* of the move given the number.
*/
char * war_get_move_name (int move)
{
if (move == WAR_SOMER)
return "Somersault slash";
else if (move == WAR_REVERSE)
return "Reverse Spin strike";
else if (move == WAR_KNEEL)
return "Kneel Strike";
else if (move == WAR_JAB)
return "Jab";
else if (move == WAR_HIGH)
return "High Strike";
else if (move == WAR_UPPER)
return "Uppercut slash";
else if (move == WAR_BUTTER)
return "Butterfly Slash";
else if (move == WAR_CROSS)
return "Cross Slash";
else if (move == WAR_FORWARD)
return "Forward Slash";
else if (move == WAR_CIRCLE)
return "Reverse circle";
else
return "none";
}
/*
* war_place_moves_in_list()
*
* Cycles through and places moves in order.
* Best way i could think of to do it.
*/
void war_place_moves_in_list (CHAR_DATA * ch, int move)
{
int old1, old2, old3, old4, old5, old6, old7;
old1 = ch->warcombo[1]; // Save old list
old2 = ch->warcombo[2];
old3 = ch->warcombo[3];
old4 = ch->warcombo[4];
old5 = ch->warcombo[5];
old6 = ch->warcombo[6];
old7 = ch->warcombo[7];
ch->warcombo[1] = move; // Make new list
ch->warcombo[2] = old1;
ch->warcombo[3] = old2;
ch->warcombo[4] = old3;
ch->warcombo[5] = old4;
ch->warcombo[6] = old5;
ch->warcombo[7] = old6;
return;
}
/*
* war_reset_combo()
*
* Resets each value to 0.
*/
void war_reset_combo (CHAR_DATA * ch)
{
ch->warcombo[1] = 0;
ch->warcombo[2] = 0;
ch->warcombo[3] = 0;
ch->warcombo[4] = 0;
ch->warcombo[5] = 0;
ch->warcombo[6] = 0;
ch->warcombo[7] = 0;
ch->warcombo[0] = 0;
return;
}
/*
* cal_damage()
*
* This function calculates damage for all the moves
* Its almost a hack of bool damage
*/
int cal_damage (CHAR_DATA * ch, OBJ_DATA * wield, int move)
{
int dam;
int diceroll;
int skill, sn;
sn = get_weapon_sn (ch);
skill = 20 + get_weapon_skill (ch, sn);
// Get the damage of the weapon
dam = number_range (wield->value[1] * skill / 100, wield->value[2] * skill / 100);
// Add enhanced damage
if (get_skill (ch, gsn_enhanced_damage) > 0)
{
diceroll = number_percent ();
if (diceroll <= get_skill (ch, gsn_enhanced_damage))
{
check_improve (ch, gsn_enhanced_damage, TRUE, 6);
dam += 2 * (dam * diceroll / 300);
}
}
dam += GET_DAMROLL(ch);
switch (move)
{
default:
case WAR_JAB:
break;
case WAR_KNEEL:
case WAR_UPPER:
case WAR_FORWARD:
dam *= 1.25;
break;
case WAR_REVERSE:
case WAR_HIGH:
case WAR_CROSS:
dam *= 1.5;
break;
case WAR_SOMER:
case WAR_BUTTER:
dam *= 2;
break;
case WAR_CIRCLE:
dam *= 2;
break;
}
return dam;
}
void do_somersault (CHAR_DATA * ch, char *argument)
{
CHAR_DATA *victim;
OBJ_DATA *wield = get_eq_char (ch, WEAR_WIELD);
int wait = 8;
int sn;
int dam;
sn = skill_lookup ("somersault slash");
int move = WAR_SOMER;
if (!IS_NPC (ch)
&& ch->level < skill_table[gsn_somersault].skill_level[ch->class])
{
send_to_char ("Huh?\n", ch);
return;
}
if ((victim = ch->fighting) == NULL)
{
send_to_char ("You aren't fighting anyone.\n", ch);
return;
}
if (wield == NULL)
{
send_to_char ("You must be using a weapon to use Somersault.\n",
ch);
return;
}
if (wield->value[0] != WEAPON_SWORD)
{
send_to_char ("You must be using a sword to use somersault.\n",
ch);
return;
}
dam = cal_damage (ch, wield, move);
char buf[MSL];
sprintf (buf, "{x"); // dam
send_to_char (buf, ch);
WAIT_STATE (ch, wait);
if (get_skill (ch, gsn_somersault) > number_percent ())
{
damage (ch, victim, dam, sn, DAM_SLASH, TRUE, TRUE);
check_improve (ch, gsn_somersault, TRUE, 1);
}
else
{
damage (ch, victim, 0, sn, DAM_SLASH, TRUE, TRUE);
check_improve (ch, sn, FALSE, 1);
}
war_check_combo (ch, victim, move);
ch->warcombo[10] = move;
check_killer (ch, victim);
return;
}
void do_reverse_spin (CHAR_DATA * ch, char *argument)
{
CHAR_DATA *victim;
OBJ_DATA *wield = get_eq_char (ch, WEAR_WIELD);
int wait = 8;
int sn;
int dam;
sn = skill_lookup ("reverse spin strike");
int move = WAR_REVERSE;
if (!IS_NPC (ch)
&& ch->level < skill_table[gsn_reverse_spin].skill_level[ch->class])
{
send_to_char ("Huh?\n", ch);
return;
}
if ((victim = ch->fighting) == NULL)
{
send_to_char ("You aren't fighting anyone.\n", ch);
return;
}
if (wield == NULL)
{
send_to_char ("You must be using a weapon to use reverse spin.\n",
ch);
return;
}
if (wield->value[0] != WEAPON_SWORD)
{
send_to_char ("You must be using a sword to use reverse spin.\n",
ch);
return;
}
dam = cal_damage (ch, wield, move);
char buf[MSL];
sprintf (buf, "{x"); // dam
send_to_char (buf, ch);
WAIT_STATE (ch, wait);
if (get_skill (ch, gsn_reverse_spin) > number_percent ())
{
damage (ch, victim, dam, sn, DAM_SLASH, TRUE, TRUE);
check_improve (ch, gsn_reverse_spin, TRUE, 1);
}
else
{
damage (ch, victim, 0, sn, DAM_SLASH, TRUE, TRUE);
check_improve (ch, sn, FALSE, 1);
}
war_check_combo (ch, victim, move);
ch->warcombo[10] = move;
check_killer (ch, victim);
return;
}
void do_kneel (CHAR_DATA * ch, char *argument)
{
CHAR_DATA *victim;
OBJ_DATA *wield = get_eq_char (ch, WEAR_WIELD);
int wait = 8;
int sn;
int dam;
sn = skill_lookup ("kneel strike");
int move = WAR_KNEEL;
if (!IS_NPC (ch)
&& ch->level < skill_table[gsn_kneel].skill_level[ch->class])
{
send_to_char ("Huh?\n", ch);
return;
}
if ((victim = ch->fighting) == NULL)
{
send_to_char ("You aren't fighting anyone.\n", ch);
return;
}
if (wield == NULL)
{
send_to_char ("You must be using a weapon to use kneel strike.\n",
ch);
return;
}
if (wield->value[0] != WEAPON_SWORD)
{
send_to_char ("You must be using a sword to use kneel strike.\n",
ch);
return;
}
dam = cal_damage (ch, wield, move);
char buf[MSL];
sprintf (buf, "{x"); // dam
send_to_char (buf, ch);
WAIT_STATE (ch, wait);
if (get_skill (ch, gsn_kneel) > number_percent ())
{
damage (ch, victim, dam, sn, DAM_PIERCE, TRUE, TRUE);
check_improve (ch, gsn_kneel, TRUE, 1);
}
else
{
damage (ch, victim, 0, sn, DAM_PIERCE, TRUE, TRUE);
check_improve (ch, sn, FALSE, 1);
}
war_check_combo (ch, victim, move);
ch->warcombo[10] = move;
check_killer (ch, victim);
return;
}
void do_stab (CHAR_DATA * ch, char *argument)
{
CHAR_DATA *victim;
OBJ_DATA *wield = get_eq_char (ch, WEAR_WIELD);
int wait = 8;
int sn;
int dam;
sn = skill_lookup ("jab");
int move = WAR_JAB;
if (!IS_NPC (ch)
&& ch->level < skill_table[gsn_sword].skill_level[ch->class])
{
send_to_char ("Huh?\n", ch);
return;
}
if ((victim = ch->fighting) == NULL)
{
send_to_char ("You aren't fighting anyone.\n", ch);
return;
}
if (wield == NULL)
{
send_to_char ("You must be using a weapon to use jab.\n", ch);
return;
}
if (wield->value[0] != WEAPON_SWORD)
{
send_to_char ("You must be using a sword to use jab.\n", ch);
return;
}
dam = cal_damage (ch, wield, move);
char buf[MSL];
sprintf (buf, "{x"); // dam
send_to_char (buf, ch);
WAIT_STATE (ch, wait);
if (get_skill (ch, gsn_stab) > number_percent ())
{
damage (ch, victim, dam, sn, DAM_PIERCE, TRUE, TRUE);
check_improve (ch, gsn_stab, TRUE, 1);
}
else
{
damage (ch, victim, 0, sn, DAM_PIERCE, TRUE, TRUE);
check_improve (ch, sn, FALSE, 1);
}
war_check_combo (ch, victim, move);
ch->warcombo[10] = move;
check_killer (ch, victim);
return;
}
void do_high_strike (CHAR_DATA * ch, char *argument)
{
CHAR_DATA *victim;
OBJ_DATA *wield = get_eq_char (ch, WEAR_WIELD);
int wait = 8;
int sn;
int dam;
sn = skill_lookup ("high strike");
int move = WAR_HIGH;
if (!IS_NPC (ch)
&& ch->level < skill_table[gsn_high_strike].skill_level[ch->class])
{
send_to_char ("Huh?\n", ch);
return;
}
if ((victim = ch->fighting) == NULL)
{
send_to_char ("You aren't fighting anyone.\n", ch);
return;
}
if (wield == NULL)
{
send_to_char ("You must be using a weapon to use high strike.\n",
ch);
return;
}
if (wield->value[0] != WEAPON_SWORD)
{
send_to_char ("You must be using a sword to use high strike.\n",
ch);
return;
}
dam = cal_damage (ch, wield, move);
char buf[MSL];
sprintf (buf, "{x"); // dam
send_to_char (buf, ch);
WAIT_STATE (ch, wait);
if (get_skill (ch, gsn_high_strike) > number_percent ())
{
damage (ch, victim, dam, sn, DAM_PIERCE, TRUE, TRUE);
check_improve (ch, gsn_high_strike, TRUE, 1);
}
else
{
damage (ch, victim, 0, sn, DAM_PIERCE, TRUE, TRUE);
check_improve (ch, sn, FALSE, 1);
}
war_check_combo (ch, victim, move);
ch->warcombo[10] = move;
check_killer (ch, victim);
return;
}
void do_uppercut_slash (CHAR_DATA * ch, char *argument)
{
CHAR_DATA *victim;
OBJ_DATA *wield = get_eq_char (ch, WEAR_WIELD);
int wait = 8;
int sn;
int dam;
sn = skill_lookup ("uppercut slash");
int move = WAR_UPPER;
if (!IS_NPC (ch)
&& ch->level < skill_table[gsn_upper_cut].skill_level[ch->class])
{
send_to_char ("Huh?\n", ch);
return;
}
if ((victim = ch->fighting) == NULL)
{
send_to_char ("You aren't fighting anyone.\n", ch);
return;
}
if (wield == NULL)
{
send_to_char
("You must be using a weapon to use uppercut slash.\n", ch);
return;
}
if (wield->value[0] != WEAPON_SWORD)
{
send_to_char
("You must be using a sword to use uppercut slash.\n", ch);
return;
}
dam = cal_damage (ch, wield, move);
char buf[MSL];
sprintf (buf, "{x"); // dam
send_to_char (buf, ch);
WAIT_STATE (ch, wait);
if (get_skill (ch, gsn_upper_cut) > number_percent ())
{
damage (ch, victim, dam, sn, DAM_SLASH, TRUE, TRUE);
check_improve (ch, gsn_upper_cut, TRUE, 1);
}
else
{
damage (ch, victim, 0, sn, DAM_SLASH, TRUE, TRUE);
check_improve (ch, sn, FALSE, 1);
}
war_check_combo (ch, victim, move);
ch->warcombo[10] = move;
check_killer (ch, victim);
return;
}
void do_butterfly (CHAR_DATA * ch, char *argument)
{
CHAR_DATA *victim;
OBJ_DATA *wield = get_eq_char (ch, WEAR_WIELD);
int wait = 8;
int sn;
int dam;
sn = skill_lookup ("butterfly slash");
int move = WAR_BUTTER;
if (!IS_NPC (ch)
&& ch->level < skill_table[gsn_butterfly_cut].skill_level[ch->class])
{
send_to_char ("Huh?\n", ch);
return;
}
if ((victim = ch->fighting) == NULL)
{
send_to_char ("You aren't fighting anyone.\n", ch);
return;
}
if (wield == NULL)
{
send_to_char
("You must be using a weapon to use butterfly slice.\n", ch);
return;
}
if (wield->value[0] != WEAPON_SWORD)
{
send_to_char
("You must be using a sword to use butterfly slice.\n", ch);
return;
}
dam = cal_damage (ch, wield, move);
WAIT_STATE (ch, wait);
if (get_skill (ch, gsn_butterfly_cut) > number_percent ())
{
damage (ch, victim, dam, sn, DAM_SLASH, TRUE, TRUE);
check_improve (ch, gsn_butterfly_cut, TRUE, 1);
}
else
{
damage (ch, victim, 0, sn, DAM_SLASH, TRUE, TRUE);
check_improve (ch, sn, FALSE, 1);
}
war_check_combo (ch, victim, move);
ch->warcombo[10] = move;
check_killer (ch, victim);
return;
}
void do_cross_slash (CHAR_DATA * ch, char *argument)
{
CHAR_DATA *victim;
OBJ_DATA *wield = get_eq_char (ch, WEAR_WIELD);
int wait = 8;
int sn;
int dam;
sn = skill_lookup ("cross slash");
int move = WAR_CROSS;
if (!IS_NPC (ch) && ch->level < skill_table[gsn_cross_cut].skill_level[ch->class])
{
send_to_char ("Huh?\n", ch);
return;
}
if ((victim = ch->fighting) == NULL)
{
send_to_char ("You aren't fighting anyone.\n", ch);
return;
}
if (wield == NULL)
{
send_to_char ("You must be using a weapon to use cross slash.\n", ch);
return;
}
if (wield->value[0] != WEAPON_SWORD)
{
send_to_char ("You must be using a sword to use cross slash.\n", ch);
return;
}
dam = cal_damage (ch, wield, move);
send_to_char ("{x", ch);
WAIT_STATE (ch, wait);
if (get_skill (ch, gsn_cross_cut) > number_percent ())
{
damage (ch, victim, dam, sn, DAM_SLASH, TRUE, TRUE);
check_improve (ch, gsn_cross_cut, TRUE, 1);
}
else
{
damage (ch, victim, 0, sn, DAM_SLASH, TRUE, TRUE);
check_improve (ch, sn, FALSE, 1);
}
war_check_combo (ch, victim, move);
ch->warcombo[10] = move;
check_killer (ch, victim);
return;
}
void do_forward_slash (CHAR_DATA * ch, char *argument)
{
CHAR_DATA *victim;
OBJ_DATA *wield = get_eq_char (ch, WEAR_WIELD);
int wait = 8;
int sn;
int dam;
sn = skill_lookup ("forward slash");
int move = WAR_FORWARD;
if (!IS_NPC (ch) && ch->level < skill_table[gsn_slash_cut].skill_level[ch->class])
{
send_to_char ("Huh?\n", ch);
return;
}
if ((victim = ch->fighting) == NULL)
{
send_to_char ("You aren't fighting anyone.\n", ch);
return;
}
if (wield == NULL)
{
send_to_char("You must be using a weapon to use forward slash.\n", ch);
return;
}
if (wield->value[0] != WEAPON_SWORD)
{
send_to_char ("You must be using a sword to use forward slash.\n", ch);
return;
}
dam = cal_damage (ch, wield, move);
WAIT_STATE (ch, wait);
if (get_skill (ch, gsn_slash_cut) > number_percent ())
{
damage (ch, victim, dam, sn, DAM_SLASH, TRUE, TRUE);
check_improve (ch, gsn_slash_cut, TRUE, 1);
}
else
{
damage (ch, victim, 0, sn, DAM_SLASH, TRUE, TRUE);
check_improve (ch, sn, FALSE, 1);
}
war_check_combo (ch, victim, move);
ch->warcombo[10] = move;
check_killer (ch, victim);
return;
}
void do_reverse_circle (CHAR_DATA * ch, char *argument)
{
CHAR_DATA *victim;
OBJ_DATA *wield = get_eq_char (ch, WEAR_WIELD);
int wait = 8;
int sn;
int dam;
sn = skill_lookup ("reverse circle");
int move = WAR_CIRCLE;
if (!IS_NPC (ch) && ch->level < skill_table[gsn_sword_circle].skill_level[ch->class])
{
send_to_char ("Huh?\n", ch);
return;
}
if ((victim = ch->fighting) == NULL)
{
send_to_char ("You aren't fighting anyone.\n", ch);
return;
}
if (wield == NULL)
{
send_to_char("You must be using a weapon to use reverse circle.\n", ch);
return;
}
if (wield->value[0] != WEAPON_SWORD)
{
send_to_char("You must be using a sword to use reverse circle.\n", ch);
return;
}
dam = cal_damage (ch, wield, move);
WAIT_STATE (ch, wait);
if (get_skill (ch, gsn_sword_circle) > number_percent ())
{
damage (ch, victim, dam, sn, DAM_SLASH, TRUE, TRUE);
check_improve (ch, gsn_sword_circle, TRUE, 1);
}
else
{
damage (ch, victim, 0, sn, DAM_SLASH, TRUE, TRUE);
check_improve (ch, sn, FALSE, 1);
}
war_check_combo (ch, victim, move);
ch->warcombo[10] = move;
check_killer (ch, victim);
return;
}