//Read config.ini
INCLUDE ~%install%/config.tph~

//Gives 100 in Set Traps
COPY ~%files%/settraps.SPL~  ~override/%kitid%.SPL~

//Create abilities 2da
INCLUDE ~%install%/abilities.tph~



//Add fighter kit

ACTION_IF (nofighter = 0) BEGIN
  LAF ADD_KIT_EX
    INT_VAR
      kit_class = 2
      mixed = RESOLVE_STR_REF (@1)
      lower = RESOLVE_STR_REF (@2)
      help = RESOLVE_STR_REF (@3)
    STR_VAR
      kit_name = ~D2KITMULE~
      clab_path = ~%kitid%~
  END
END


//Add bard kit

ACTION_IF (nobard = 0) BEGIN
  COPY_EXISTING ~%kitid%.2DA~  ~override/%kitid%b.2DA~
    PATCH_IF (GAME_IS ~iwdee~) BEGIN 
      LPF d2_kit_ability_adder INT_VAR passive=1 STR_VAR resource=~#BARD-1~ END
    END
    ELSE BEGIN 
      LPF d2_kit_ability_adder INT_VAR passive=1 STR_VAR resource=~FJBARD~ END
    END

  LAF ADD_KIT_EX
    INT_VAR
      kit_class = 5
      mixed = RESOLVE_STR_REF (@1)
      lower = RESOLVE_STR_REF (@2)
      help = RESOLVE_STR_REF (@3)
    STR_VAR
      kit_name = ~D2KITMULEB~
      clab_path = ~%kitid%b~
  END
END


//Add druid kit

ACTION_IF (nodruid = 0) BEGIN
  COPY_EXISTING ~%kitid%.2DA~  ~override/%kitid%d.2DA~
    PATCH_IF (GAME_IS ~iwdee~) BEGIN 
      LPF d2_kit_ability_adder INT_VAR level=15 passive=1 STR_VAR resource=~SPCL939~ END
      LPF d2_kit_ability_adder INT_VAR level=9 passive=1 STR_VAR resource=~SPCL924~ END
    END
    ELSE BEGIN 
      LPF d2_kit_ability_adder INT_VAR level=15 passive=1 STR_VAR resource=~SPCL924~ END
      LPF d2_kit_ability_adder INT_VAR level=18 passive=1 STR_VAR resource=~SPCL925~ END
      LPF d2_kit_ability_adder INT_VAR level=21 passive=1 STR_VAR resource=~SPCL926~ END
      LPF d2_kit_ability_adder INT_VAR level=24 passive=1 STR_VAR resource=~SPCL927~ END
    END

  LAF ADD_KIT_EX
    INT_VAR
      kit_class = 11
      mixed = RESOLVE_STR_REF (@1)
      lower = RESOLVE_STR_REF (@2)
      help = RESOLVE_STR_REF (@3)
    STR_VAR
      kit_name = ~D2KITMULED~
      clab_path = ~%kitid%d~
  END
END


/*
*/