Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-DECLARE_BONUS(nobonus, "")
-DECLARE_BONUS(tracheotomy, "Tracheotomy!")
-DECLARE_BONUS(backstab, "Backstabber!")
-DECLARE_BONUS(spinecrusher, "Spinecrusher!")
-DECLARE_BONUS(ninja, "Ninja Bonus!")
-DECLARE_BONUS(style, "Style Bonus!")
-DECLARE_BONUS(cannon, "Leg Cannon!")
-DECLARE_BONUS(aimbonus, "Nice Aim!")
-DECLARE_BONUS(deepimpact, "Heavy Impact!")
-DECLARE_BONUS(touchofdeath, "Touch of Death!")
-DECLARE_BONUS(swordreversebonus, "Sword Disarm!")
-DECLARE_BONUS(staffreversebonus, "Staff Disarm!")
-DECLARE_BONUS(reverseko, "Reversal KO!")
-DECLARE_BONUS(solidhit, "Solid Hit!")
-DECLARE_BONUS(twoxcombo, "2X Combo!")
-DECLARE_BONUS(threexcombo, "3X Combo!")
-DECLARE_BONUS(fourxcombo, "4X COMBO!")
-DECLARE_BONUS(megacombo, "MEGA COMBO!")
-DECLARE_BONUS(Reversal, "Reversal!")
-DECLARE_BONUS(Stabbonus, "Punctured!")
-DECLARE_BONUS(Slicebonus, "Sliced!")
-DECLARE_BONUS(Bullseyebonus, "Bullseye!")
-DECLARE_BONUS(Slashbonus, "Slashed!")
-DECLARE_BONUS(Wolfbonus, "WOLF SLAYER!")
-DECLARE_BONUS(FinishedBonus, "SLAIN!")
-DECLARE_BONUS(TackleBonus, "Tackle!")
-DECLARE_BONUS(AboveBonus, "Death from Above!")
+DECLARE_BONUS(nobonus, "", 0)
+DECLARE_BONUS(tracheotomy, "Tracheotomy!", 100)
+DECLARE_BONUS(backstab, "Backstabber!", 100)
+DECLARE_BONUS(spinecrusher, "Spinecrusher!", 100)
+DECLARE_BONUS(ninja, "Ninja Bonus!", 60)
+DECLARE_BONUS(style, "Style Bonus!", 150)
+DECLARE_BONUS(cannon, "Leg Cannon!", 100)
+DECLARE_BONUS(aimbonus, "Nice Aim!", 150)
+DECLARE_BONUS(deepimpact, "Heavy Impact!", 50)
+DECLARE_BONUS(touchofdeath, "Touch of Death!", 150)
+DECLARE_BONUS(swordreversebonus, "Sword Disarm!", 100)
+DECLARE_BONUS(staffreversebonus, "Staff Disarm!", 100)
+DECLARE_BONUS(reverseko, "Reversal KO!", 100)
+DECLARE_BONUS(solidhit, "Solid Hit!", 10)
+DECLARE_BONUS(twoxcombo, "2X Combo!", 20)
+DECLARE_BONUS(threexcombo, "3X Combo!", 40)
+DECLARE_BONUS(fourxcombo, "4X COMBO!", 80)
+DECLARE_BONUS(megacombo, "MEGA COMBO!", 160)
+DECLARE_BONUS(Reversal, "Reversal!", 60)
+DECLARE_BONUS(Stabbonus, "Punctured!", 40)
+DECLARE_BONUS(Slicebonus, "Sliced!", 10)
+DECLARE_BONUS(Bullseyebonus, "Bullseye!", 30)
+DECLARE_BONUS(Slashbonus, "Slashed!", 40)
+DECLARE_BONUS(Wolfbonus, "WOLF SLAYER!", 300)
+DECLARE_BONUS(FinishedBonus, "SLAIN!", 200)
+DECLARE_BONUS(TackleBonus, "Tackle!", 5)
+DECLARE_BONUS(AboveBonus, "Death from Above!", 50)
skeleton.free=0;
if(id==0)OPENAL_SetPaused(channels[whooshsound], false);
- //if(victim->damage>victim->damagetolerance){
- if(id==0){
- bonus=cannon;
- bonustime=0;
- bonusvalue=100;
- }
- //}
+ award_bonus(id, cannon);
}
else if (victim->isCrouch()){
targetanimation=rabbitkickreversedanim;
else return 0;
}
-void SolidHitBonus();
void SolidHitBonus(){
if(bonustime<1.5&&(bonus==fourxcombo||bonus==megacombo)){
- bonus=megacombo;
- bonustime=0;
- bonusvalue=160;
+ award_bonus(0, megacombo);
}
else if(bonustime<1.5&&bonus==threexcombo){
- bonus=fourxcombo;
- bonustime=0;
- bonusvalue=80;
+ award_bonus(0, fourxcombo);
}
else if(bonustime<1.5&&bonus==twoxcombo){
- bonus=threexcombo;
- bonustime=0;
- bonusvalue=40;
+ award_bonus(0, threexcombo);
}
else if(bonustime<1.5&&bonus==solidhit){
- bonus=twoxcombo;
- bonustime=0;
- bonusvalue=20;
+ award_bonus(0, twoxcombo);
}
else {
- bonus=solidhit;
- bonustime=0;
- bonusvalue=10;
+ award_bonus(0, solidhit);
}
}
slomodelay=.2;
}*/
if(!dead&&creature==wolftype){
- bonus=Wolfbonus;
- bonustime=0;
- bonusvalue=300;
+ award_bonus(0, Wolfbonus);
}
dead=2;
coords=20;
victim->spurt=1;
victim->DoBloodBig(1/victim->armorhead,210);
}
+ award_bonus(id, TackleBonus);
if(id==0){
- bonus=TackleBonus;
- bonustime=0;
- bonusvalue=5;
if(victim->aitype==gethelptype)bonusvalue=50;
}
}
victim->DoDamage(damagemult*150/victim->protectionhead);
if(victim->damage>victim->damagetolerance){
- if(id==0){
- bonus=style;
- bonustime=0;
- bonusvalue=150;
- }
+ award_bonus(id, style);
}
else if(id==0){
SolidHitBonus();
victim->DoDamage(damagemult*150/victim->protectionhead);
if(victim->damage>victim->damagetolerance){
- if(id==0){
- bonus=style;
- bonustime=0;
- bonusvalue=150;
- }
+ award_bonus(id, style);
}
else if(id==0){
SolidHitBonus();
if(whichtri!=-1){
if(victim->dead!=2){
victim->DoDamage(abs((victim->damagetolerance-victim->permanentdamage)*2));
- if(id==0&&!victim->dead){
- bonus=FinishedBonus;
- bonustime=0;
- bonusvalue=200;
- }
+ if (!victim->dead)
+ award_bonus(id, FinishedBonus);
}
if(bloodtoggle)weapons.bloody[weaponids[weaponactive]]=2;
if(tutoriallevel!=1)victim->DoBloodBig(1.5/victim->armorhigh,225);
//}
- if(id==0){
- bonus=Slicebonus;
- bonustime=0;
- bonusvalue=10;
- }
+ award_bonus(id, Slicebonus);
if(tutoriallevel!=1){
float gLoc[3];
float vel[3];
if(targetanimation==swordslashanim&&animation[targetanimation].label[currentframe]==5&&victim->targetanimation!=rollanim){
if(findDistancefast(&coords,&victim->coords)<(scale*5)*(scale*5)*6.5&&victim->targetanimation!=dodgebackanim){
if(victim->weaponactive==-1||normaldotproduct(victim->facing,victim->coords-coords)>0||(Random()%2==0)){
- if(id==0){
- bonus=Slashbonus;
- bonustime=0;
- bonusvalue=40;
- }
+ award_bonus(id, Slashbonus);
escapednum=0;
if(tutoriallevel!=1){
if(normaldotproduct(victim->facing,victim->coords-coords)<0)victim->DoBloodBig(2/victim->armorhigh,190);
if(tutoriallevel!=1){
victim->DoDamage(damagemult*120/victim->protectionhigh);
- if(id==0){
- bonus=solidhit;
- bonustime=0;
- bonusvalue=30;
- }
+ award_bonus(id, solidhit, 30);
}
}
}
victim->Puff(head);
if(tutoriallevel!=1){victim->DoDamage(damagemult*350/victim->protectionhead);
- if(id==0){
- bonus=solidhit;
- bonustime=0;
- bonusvalue=60;
- }
+ award_bonus(id, solidhit, 60);
}
}
}
if(tutoriallevel!=1){victim->DoDamage(damagemult*100/victim->protectionhigh);
if(!victim->dead){
- if(id==0){
- bonus=solidhit;
- bonustime=0;
- bonusvalue=40;
- }
+ award_bonus(id, solidhit, 40);
}
}
}
victim->Puff(abdomen);
victim->DoDamage(damagemult*150/victim->protectionhigh);
- if(id==0){
- bonus=Reversal;
- bonustime=0;
- bonusvalue=60;
- }
+ award_bonus(id, Reversal);
}
if((targetanimation==swordslashreversalanim||targetanimation==knifeslashreversalanim||targetanimation==staffhitreversalanim||targetanimation==staffspinhitreversalanim)&&animation[targetanimation].label[currentframe]==5){
vel[1]=velocity.y;
vel[2]=velocity.z;
- if(id==0){
- bonus=staffreversebonus;
- bonustime=0;
- bonusvalue=100;
- }
+ award_bonus(id, staffreversebonus);
if(tutoriallevel!=1){
PlaySoundEx( heavyimpactsound, samp[heavyimpactsound], NULL, true);
OPENAL_SetPaused(channels[heavyimpactsound], false);
}
victim->RagDoll(0);
- if(id==0){
- bonus=staffreversebonus;
- bonustime=0;
- bonusvalue=100;
- }
+ award_bonus(id, staffreversebonus); // Huh, again?
XYZ relative;
relative=victim->coords-oldcoords;
victim->Puff(abdomen);
victim->DoDamage(damagemult*90/victim->protectionhigh);
- if(id==0){
- bonus=Reversal;
- bonustime=0;
- bonusvalue=60;
- }
+ award_bonus(id, Reversal);
bool doslice;
doslice=0;
victim->skeleton.joints[victim->skeleton.jointlabels[rightelbow]].velocity*=.5-1;
victim->skeleton.joints[victim->skeleton.jointlabels[rightshoulder]].velocity*=.7-1;
- if(id==0){
- bonus=swordreversebonus;
- bonustime=0;
- bonusvalue=100;
- }
- //victim->DoDamage(90);
-
- /*if(weaponactive!=-1){
- float gLoc[3];
- float vel[3];
- gLoc[0]=victim->coords.x;
- gLoc[1]=victim->coords.y;
- gLoc[2]=victim->coords.z;
- vel[0]=velocity.x;
- vel[1]=velocity.y;
- vel[2]=velocity.z;
- victim->DoBloodBig(2,225);
- PlaySoundEx( knifeslicesound, samp[knifeslicesound], NULL, true);
- OPENAL_3D_SetAttributes(channels[knifeslicesound], gLoc, vel);
- OPENAL_SetVolume(channels[knifeslicesound], 512);
- OPENAL_SetPaused(channels[knifeslicesound], false);
- if(bloodtoggle&&!weapons.bloody[weaponids[weaponactive]])weapons.bloody[weaponids[weaponactive]]=1;
- weapons.blooddrip[weaponids[weaponactive]]+=3;
- }*/
+ award_bonus(id, swordreversebonus);
}
if(hasvictim&&targetanimation==knifeslashreversalanim&&animation[targetanimation].label[currentframe]==7){
victim->Puff(abdomen);
victim->DoDamage(damagemult*30/victim->protectionhigh);
- if(id==0){
- bonus=Reversal;
- bonustime=0;
- bonusvalue=60;
- }
+ award_bonus(id, Reversal);
}
if(hasvictim&&targetanimation==sneakattackanim&&animation[targetanimation].label[currentframe]==7){
victim->DoBloodBig(2,175);
}
}
- if(id==0){
- bonus=spinecrusher;
- bonustime=0;
- bonusvalue=100;
- }
+ award_bonus(id, spinecrusher);
}
if(hasvictim&&(targetanimation==knifefollowanim||targetanimation==knifesneakattackanim)&&animation[targetanimation].label[currentframe]==5){
Sprite::MakeSprite(bloodflamesprite, footpoint,footvel*5, 1,1,1, .3, 1);
Sprite::MakeSprite(bloodflamesprite, footpoint,footvel*2, 1,1,1, .3, 1);
victim->DoBloodBig(200,195);
- if(id==0){
- bonus=tracheotomy;
- bonustime=0;
- bonusvalue=100;
- }
-
- //victim->neckspurtamount=5;
+ award_bonus(id, tracheotomy);
}
if(targetanimation==knifefollowanim){
- if(id==0){
- bonus=Stabbonus;
- bonustime=0;
- bonusvalue=40;
- }
+ award_bonus(id, Stabbonus);
XYZ footvel,footpoint;
footvel=0;
footpoint=weapons.tippoint[weaponids[0]];
if(hasvictim&&(targetanimation==swordsneakattackanim)&&animation[targetanimation].label[currentframe]==5){
if(weaponactive!=-1&&victim->bloodloss<victim->damagetolerance){
- if(id==0){
- bonus=backstab;
- bonustime=0;
- bonusvalue=100;
- }
+ award_bonus(id, backstab);
escapednum=0;
}
}
- if(id==0){
- bonus=Reversal;
- bonustime=0;
- bonusvalue=60;
- }
+ award_bonus(id, Reversal);
victim->Puff(neck);
if(hasvictim&&(targetanimation==spinkickreversalanim||targetanimation==sweepreversalanim||targetanimation==rabbitkickreversalanim||targetanimation==upunchreversalanim||targetanimation==jumpreversalanim||targetanimation==swordslashreversalanim||targetanimation==knifeslashreversalanim||targetanimation==rabbittacklereversal||targetanimation==wolftacklereversal||targetanimation==staffhitreversalanim||targetanimation==staffspinhitreversalanim))
if(victim->damage>victim->damagetolerance&&bonus!=reverseko){
- if(id==0){
- bonus=reverseko;
- bonustime=0;
- bonusvalue=100;
- }
+ award_bonus(id, reverseko);
}
}
}
if(!dead&&creature==wolftype){
- bonus=Wolfbonus;
- bonustime=0;
- bonusvalue=300;
+ award_bonus(0, Wolfbonus);
}
dead=2;
if(targetanimation==knifefollowedanim&&!skeleton.free){
unconscioustime=0;
if(creature==wolftype){
- bonus=Wolfbonus;
- bonustime=0;
- bonusvalue=300;
+ award_bonus(0, Wolfbonus);
}
RagDoll(0);
bonusvalue=300;
}
- if(id!=0&&unconscioustime<.1&&(bonus!=spinecrusher||bonustime>1)&&(bonus!=FinishedBonus||bonustime>1)&&bloodloss<damagetolerance){
- bonus=touchofdeath;
- bonustime=0;
- bonusvalue=150;
- }
+ if(unconscioustime<.1&&(bonus!=spinecrusher||bonustime>1)&&(bonus!=FinishedBonus||bonustime>1)&&bloodloss<damagetolerance)
+ award_bonus(id, touchofdeath);
if(id!=0&&unconscioustime>.1){
numafterkill++;
}
skeleton.DoGravity(&scale);
float damageamount;
damageamount=skeleton.DoConstraints(&coords,&scale)*5;
- if(id!=0&&damage>damagetolerance-damageamount&&!dead&&(bonus!=spinecrusher||bonustime>1)&&(bonus!=style||bonustime>1)&&(bonus!=cannon||bonustime>1)){
- bonus=deepimpact;
- bonustime=0;
- bonusvalue=50;
- }
+ if(damage>damagetolerance-damageamount&&!dead&&(bonus!=spinecrusher||bonustime>1)&&(bonus!=style||bonustime>1)&&(bonus!=cannon||bonustime>1))
+ award_bonus(id, deepimpact);
DoDamage(damageamount/((protectionhigh+protectionhead+protectionlow)/3));
average=0;