/*
Install kits
*/


//Prep
INCLUDE ~%install%/weapontypes.tph~
INCLUDE ~%install%/weapontypes2.tph~
INCLUDE ~%install%/clabprep.tph~
INCLUDE ~%install%/classchecks.tph~
INCLUDE ~%install%/hlatables.tph~
INCLUDE ~%install%/enrageprep.tph~


//make dummy spell
ACTION_IF !(FILE_EXISTS ~override/d2spell.SPL~) BEGIN
  COPY_EXISTING ~SPCL142.SPL~  ~override/d2spell.SPL~
    LPF d2_subspell_remove_effects END
    LPF ALTER_EFFECT INT_VAR opcode=0 parameter1=0 parameter2=0 timing=0 duration=0 END
    WRITE_LONG 0x18 THIS | BIT14
    WRITE_LONG 0x18 THIS | BIT25
  IF_EXISTS
END


//Kensaizerker (d2mk1)
ACTION_IF (nokensaizerker = 0) BEGIN
  OUTER_TEXT_SPRINT kitid ~d2mk1~
  OUTER_TEXT_SPRINT kitname ~KENSAIZERKER~
  INCLUDE ~%install%/variables.tph~
  INCLUDE ~%install%/resources.tph~
  INCLUDE ~%install%/%kitname%.tph~
END


//Monastery Swordsman (d2mk2)
ACTION_IF (nomonastery = 0) BEGIN
  OUTER_TEXT_SPRINT kitid ~d2mk2~
  OUTER_TEXT_SPRINT kitname ~MONASTERY~
  INCLUDE ~%install%/variables.tph~
  INCLUDE ~%install%/resources.tph~
  INCLUDE ~%install%/vorpal.tph~

  ACTION_IF (ee_game > 0) BEGIN
    INCLUDE ~%install%/%kitname%.tph~
    INCLUDE ~%install%/%kitname%ki.tph~
    INCLUDE ~%install%/%kitname%config.tph~
    INCLUDE ~%install%/%kitname%profs.tph~
  END ELSE BEGIN
    INCLUDE ~%install%/%kitname%ranger.tph~
  END
END


//Jesterblade (d2mk3)
ACTION_IF (nojesterblade = 0) BEGIN
  OUTER_TEXT_SPRINT kitid ~d2mk3~
  OUTER_TEXT_SPRINT kitname ~JESTERBLADE~
  INCLUDE ~%install%/variables.tph~
  INCLUDE ~%install%/resources.tph~
  INCLUDE ~%install%/%kitname%.tph~
  INCLUDE ~%install%/%kitname%r.tph~
  INCLUDE ~%install%/%kitname%rr.tph~
END


//
INCLUDE ~%install%/hlaupdatermk1.tph~
INCLUDE ~%install%/tofenragepatch.tph~
INCLUDE ~%install%/castingspeed.tph~
INCLUDE ~%install%/spellpatchingmk1.tph~
INCLUDE ~%install%/bg2opcodecheck.tph~
INCLUDE ~%install%/waninjapatch2.tph~


/*
*/