Advertisement
Guest User

Untitled

a guest
Jan 20th, 2019
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.39 KB | None | 0 0
  1.     getAttackDelay(Command/Technique/t, fCombat/c, mob/target){
  2.         if("[target.ID]" in c.comboList){
  3.             var
  4.                 comboL[] = c.comboList["[target.ID]"]
  5.                 xTendCombo = FALSE;
  6.  
  7.             if(!target.unconscious && comboL[c.comboCount["[target.ID]"]] == t.comboName){
  8.                 c.mobRef:_doEnergy(1);
  9.                 target._doEnergy(1);
  10.                 c.comboCount["[target.ID]"]++;
  11.                 if(c.comboCount["[target.ID]"] > comboL.len){
  12.                     if(prob(fightExtendCombo)){ xTendCombo = TRUE; }
  13.  
  14.                     if(c.mobRef:shyouken && prob(fightShyoukenCombo) || xTendCombo){
  15.                         send("{B[c.mobRef:fCombat.comboCount["[target.ID]"] - 1]{x {Rhit combo!{x",c.mobRef)
  16.                         c.comboList.Remove("[target.ID]")
  17.                         c.comboCount.Remove("[target.ID]")
  18.                         /* SEND EM FLYING*/
  19.                         if(xTendCombo && (game.dir2text_map(game.dirRev(c.mobRef:dir)) in target.Exits(TRUE))){
  20.                             var
  21.                                 sendDir = game.dirRev(c.mobRef:dir);
  22.                                 noCol = TRUE;
  23.                                 oldLoc = NULL;
  24.  
  25.                             send("{B*{x Your [t.name] sends [target.raceColor(target.name)] flying [game.dir2text(sendDir)]!",c.mobRef)
  26.                             send("{W*{x [c.mobRef:raceColor(c.mobRef:name)] [t.name] sends [target.raceColor(target.name)] flying [game.dir2text(sendDir)]!",a_oview_extra(0,c.mobRef,target))
  27.                             send("{R*{x [c.mobRef:raceColor(c.mobRef:name)] [t.name] sends you flying [game.dir2text(sendDir)]!",target)
  28.  
  29.                             for(var/i=rand(2,5),i>0,i--){
  30.                                 oldLoc=target.loc;
  31.                                 target.Move(get_step(target,sendDir), sendDir, 0, 0, TRUE)
  32.                                 if(oldLoc==target.loc){
  33.                                     send(buildMap(target,SMAP_LEFT,SMAP_RIGHT,SMAP_TOP,SMAP_BOT),target);
  34.                                     noCol = FALSE;
  35.                                     c.mobRef:fCombat.doDamage(target,5,10,"collision damage",NULL)
  36.                                     break;
  37.                                 } else { continue }
  38.                             }
  39.  
  40.                             if(noCol){ send(buildMap(target,SMAP_LEFT,SMAP_RIGHT,SMAP_TOP,SMAP_BOT),target); }
  41.                         }
  42.                         /* SEND EM FLYING*/
  43.  
  44.                         var/canZanz = FALSE;
  45.                         if(c.mobRef:techniques.Find(/Command/Technique/zanzoken) && c.mobRef:loc != target.loc){ canZanz = TRUE; }
  46.  
  47.                         c.mobRef:fCombat.buildCombo(target,canZanz);
  48.                         target.stunTime = (world.time + 40);
  49.                     }else{
  50.                         target.stunTime = world.time
  51.                     }
  52.                 }
  53.                 return world.time;
  54.             }else{
  55.                 if(t.breakCombo){
  56.                     target.stunTime = world.time + 31
  57.                     c.comboList.Remove("[target.ID]")
  58.                     c.comboCount.Remove("[target.ID]")
  59.                 }
  60.                 return (world.time + t.delay);
  61.             }
  62.         }
  63.         return (world.time + t.delay);
  64.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement