BACKUP ~SwordDancerKit/backup~
AUTHOR ~ced2168@columbia.edu~

VERSION ~1.1~

//MODDER

AUTO_TRA ~SwordDancerKit/tra/%s~

/*
 * This mod does not use any chapter checks
 *
ALWAYS
  ACTION_IF GAME_IS ~eet~ BEGIN
    OUTER_SET bg2_chapter = 12
  END ELSE BEGIN
    OUTER_SET bg2_chapter = 0
  END
  OUTER_FOR (i=1; i<=10; i=i+1) BEGIN
    OUTER_SET bg2_chapter = bg2_chapter + 1
    OUTER_SPRINT name_source ~bg2_chapter_%i%~
    OUTER_SET EVAL ~%name_source%~ = bg2_chapter
  END
END
*/

LANGUAGE   ~English~
           ~English~
           ~SwordDancerKit/tra/English/SwordDancerKit.tra~

BEGIN "Sword Dancer Kit" //
INCLUDE "SwordDancerKit/lib/fl#add_kit_ee.tpa"


ADD_KIT ~USAPR00~
	~USAPR00 1 1 1 1 1 1 1 1~
      ~USAPR00 0 1 0 0 1 0 0 1 1 2 3 1 1 3 3 3 1 2 2 1 1 1 3 0 0 1 2 0 2 2 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0~
	~USAPR00 0 0 0 0 0 0~
	~USAPR00 0 0 0 0 0 0~
	~USAPR00 0 0 0 0 0 0~
        ~USAPR00 0 0 0 0 0 0~
	~USAPR00 1 1 1 1 1 1 1 1 1~
	~USAPR00 0 1 1 1 1 0~
	~SwordDancerKit/CLABUSAP.2da~
	~K_F_H	K_F_D   K_F_G   K_F_E   K_F_HE   K_F_HL   K_F_HO~
	~0x00008000 2~
	~FI0~
	~LEAT12 * * BAG28 RING06 RING05 * BOOT01 AMUL19 BRAC16 BELT06 AROW11,40 BULL03,40 BOLT06,40 POTN52,5 POTN04,2 POTN14,5 DAGG12 SW1H28 STAF08~

	SAY ~sword dancer~
	SAY ~Sword Dancer~
	SAY ~Part magician and part artist, a Sword Dancer is a warrior who uses telekinetic powers to influence their movements in combat. A Sword Dancer's powers come less from muscle and more from magic, allowing them to strike more often at the expense of reducing the force of each blow. Sword Dancers rely on the speed of their weapons to disrupt and disable their opponents, and prefer to use lighter and quicker weapons, which are easier to move using telekinesis.

CLASS FEATURES:

Advantages:

- Makes two additional attack rolls with each attack (stacks with Haste and similar effects)
- May wield two weapons at once with no penalties

Disadvantages:

- All physical damage is reduced to 1/5 of its normal value (all weapons deal 80% less damage per hit)
- Can only attain Mastery (three points) in short swords, katanas, scimitars, daggers, and staffs
- Can only attain Specialization (two points) in longswords, clubs, spears, and darts
- Can only attain Proficiency (one point) in axes, bastard swords, two-handed swords, war hammers, halberds, flails, maces, and shortbows
- May not place any proficiency points in crossbows, longbows, or slings
- Cannot wear armor heavier than studded leather

- Hit Die: d8
~

LAF fl#add_kit_ee
	INT_VAR
		biography = RESOLVE_STR_REF (~~)
		briefdesc = RESOLVE_STR_REF (~Part magician and part artist, a Sword Dancer is a warrior who uses telekinetic powers to influence their movements in combat. A Sword Dancer's powers come less from muscle and more from magic, allowing them to strike more often at the expense of reducing the force of each blow. Sword Dancers rely on the speed of their weapons to disrupt and disable their opponents, and prefer to use lighter and quicker weapons, which are easier to move using telekinesis.~)
	STR_VAR
		kit_name = ~USAPR00~
		clswpbon = ~1 0 2~
		numwslot = ~4~
		clascolr = ~35 67 67 25 80~
		hpclass = ~HPPRS~
		clsrcreq = ~1 1 1 1 1 1 1~
		clasthac = ~0~
END

ADD_KIT ~USAPR01~
	~USAPR01 1 1 1 1 1 1 1 1~
      ~USAPR01 0 1 0 0 1 0 0 1 0 1 1 0 0 1 1 1 0 1 0 0 0 0 0 0 0 0 1 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0~
	~USAPR01 9 9 0 0 9 0~
	~USAPR01 0 0 0 0 0 0~
	~USAPR01 0 0 0 0 0 0~
        ~USAPR01 0 0 0 0 0 0~
	~USAPR01 1 1 1 0 0 0 0 0 0~
	~USAPR01 0 0 0 0 0 0~
	~SwordDancerKit/CLABUSA1.2da~
	~K_MN_H~
	~0x00004000 20~
	~FI0~
	~* * * BAG28 RING06 RING05 * BOOT01 AMUL19 BRAC16 BELT06 AROW11,40 BULL03,40 BOLT06,40 POTN52,5 POTN04,2 POTN14,5 DAGG12 SW1H28 STAF08~

	SAY ~stone dancer~
	SAY ~Stone Dancer~
	SAY ~Part magician and part artist, a Stone Dancer is a monk who uses telekinetic powers to influence their movements in combat. A Stone Dancer's powers come less from muscle and more from magic, allowing them to strike more often at the expense of reducing the force of each blow. Stone Dancers rely on the speed of their fists to disrupt and disable their opponents.

CLASS FEATURES:

Advantages:

- Makes two additional attack rolls with each attack.
- Gains an extra use of Stunning Blow every 3 levels after level 1 instead of 4.
- May cast Stoneskin at level 1.

Disadvantages:

- All physical damage is reduced to 1/5 of its normal value (all weapons deal 80% less damage per hit).

- Hit Die: d8
~

LAF fl#add_kit_ee
	INT_VAR
		biography = RESOLVE_STR_REF (~~)
		briefdesc = RESOLVE_STR_REF (~Part magician and part artist, a Stone Dancer is a monk who uses telekinetic powers to influence their movements in combat. A Stone Dancer's powers come less from muscle and more from magic, allowing them to strike more often at the expense of reducing the force of each blow. Stone Dancers rely on the speed of their fists to disrupt and disable their opponents.~)
	STR_VAR
		kit_name = ~USAPR01~
		clswpbon = ~1 3 2~
		numwslot = ~3~
		clascolr = ~25 28 57 2 24~
		hpclass = ~HPPRS~
		clsrcreq = ~1 1 1 1 1 1 1~
		clasthac = ~0~
END


ADD_KIT ~USAPR02~
	~USAPR02 1 1 1 1 1 1 1 1~
      ~USAPR02 0 1 0 0 1 0 0 1 0 1 1 0 0 1 1 1 0 1 0 0 0 0 0 0 0 0 1 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0~
	~USAPR02 9 9 0 0 9 0~
	~USAPR02 0 0 0 0 0 0~
	~USAPR02 0 0 0 0 0 0~
        ~USAPR02 0 0 0 0 0 0~
	~USAPR02 1 1 1 0 0 0 0 0 0~
	~USAPR02 0 0 0 0 0 0~
	~SwordDancerKit/CLABUSA2.2da~
	~K_MN_H~
	~0x00004000 20~
	~FI0~
	~* * * BAG28 RING06 RING05 * BOOT01 AMUL19 BRAC16 BELT06 AROW11,40 BULL03,40 BOLT06,40 POTN52,5 POTN04,2 POTN14,5 DAGG12 SW1H28 STAF08~

	SAY ~water dancer~
	SAY ~Water Dancer~
	SAY ~Part magician and part artist, a Water Dancer is a monk who uses telekinetic powers to influence their movements in combat. A Water Dancer's powers come less from muscle and more from magic, allowing them to strike more often at the expense of reducing the force of each blow. Water Dancers rely on the speed of their fists to disrupt and disable their opponents.

CLASS FEATURES:

Advantages:

- Makes two additional attack rolls with each attack.
- Gains an extra half attack per round at level 1.
- Gains an extra use of Stunning Blow every 3 levels after level 1 instead of 4.

Disadvantages:

- All physical damage is reduced to 1/5 of its normal value (all weapons deal 80% less damage per hit).

- Hit Die: d8
~

LAF fl#add_kit_ee
	INT_VAR
		biography = RESOLVE_STR_REF (~~)
		briefdesc = RESOLVE_STR_REF (~Part magician and part artist, a Water Dancer is a monk who uses telekinetic powers to influence their movements in combat. A Water Dancer's powers come less from muscle and more from magic, allowing them to strike more often at the expense of reducing the force of each blow. Water Dancers rely on the speed of their fists to disrupt and disable their opponents.~)
	STR_VAR
		kit_name = ~USAPR02~
		clswpbon = ~1 3 2~
		numwslot = ~3~
		clascolr = ~25 28 57 2 24~
		hpclass = ~HPPRS~
		clsrcreq = ~1 1 1 1 1 1 1~
		clasthac = ~0~
END


ADD_KIT ~USAPR03~
	~USAPR03 1 1 1 1 1 1 1 1~
      ~USAPR03 0 1 0 0 1 0 0 1 0 1 1 0 0 1 1 1 0 1 0 0 0 0 0 0 0 0 1 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0~
	~USAPR03 9 9 0 0 9 0~
	~USAPR03 0 0 0 0 0 0~
	~USAPR03 0 0 0 0 0 0~
        ~USAPR03 0 0 0 0 0 0~
	~USAPR03 1 1 1 0 0 0 0 0 0~
	~USAPR03 0 0 0 0 0 0~
	~SwordDancerKit/CLABUSA3.2da~
	~K_MN_H~
	~0x00004000 20~
	~FI0~
	~* * * BAG28 RING06 RING05 * BOOT01 AMUL19 BRAC16 BELT06 AROW11,40 BULL03,40 BOLT06,40 POTN52,5 POTN04,2 POTN14,5 DAGG12 SW1H28 STAF08~

	SAY ~flare dancer~
	SAY ~Flare Dancer~
	SAY ~Part magician and part artist, a Flare Dancer is a monk who uses telekinetic powers to influence their movements in combat. A Flare Dancer's powers come less from muscle and more from magic, allowing them to strike more often at the expense of reducing the force of each blow. Flare Dancers rely on the speed of their fists to disrupt and disable their opponents.

CLASS FEATURES:

Advantages:

- Makes two additional attack rolls with each attack.
- Deals an extra 1 fire damage with every unarmed strike.
- Gains an extra use of Stunning Blow every 3 levels after level 1 instead of 4.

Disadvantages:

- All physical damage is reduced to 1/5 of its normal value (all weapons deal 80% less damage per hit).

- Hit Die: d8
~

LAF fl#add_kit_ee
	INT_VAR
		biography = RESOLVE_STR_REF (~~)
		briefdesc = RESOLVE_STR_REF (~Part magician and part artist, a Flare Dancer is a monk who uses telekinetic powers to influence their movements in combat. A Flare Dancer's powers come less from muscle and more from magic, allowing them to strike more often at the expense of reducing the force of each blow. Flare Dancers rely on the speed of their fists to disrupt and disable their opponents.~)
	STR_VAR
		kit_name = ~USAPR03~
		clswpbon = ~1 3 2~
		numwslot = ~3~
		clascolr = ~25 28 57 2 24~
		hpclass = ~HPPRS~
		clsrcreq = ~1 1 1 1 1 1 1~
		clasthac = ~0~
END


ADD_KIT ~USAPR04~
	~USAPR04 1 1 1 1 1 1 1 1~
      ~USAPR04 0 1 0 0 1 0 0 1 0 1 1 0 0 1 1 1 0 1 0 0 0 0 0 0 0 0 1 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0~
	~USAPR04 9 9 0 0 9 0~
	~USAPR04 0 0 0 0 0 0~
	~USAPR04 0 0 0 0 0 0~
        ~USAPR04 0 0 0 0 0 0~
	~USAPR04 1 1 1 0 0 0 0 0 0~
	~USAPR04 0 0 0 0 0 0~
	~SwordDancerKit/CLABUSA4.2da~
	~K_MN_H~
	~0x00004000 20~
	~FI0~
	~* * * BAG28 RING06 RING05 * BOOT01 AMUL19 BRAC16 BELT06 AROW11,40 BULL03,40 BOLT06,40 POTN52,5 POTN04,2 POTN14,5 DAGG12 SW1H28 STAF08~

	SAY ~sky dancer~
	SAY ~Sky Dancer~
	SAY ~Part magician and part artist, a Sky Dancer is a monk who uses telekinetic powers to influence their movements in combat. A Sky Dancer's powers come less from muscle and more from magic, allowing them to strike more often at the expense of reducing the force of each blow. Sky Dancers rely on the speed of their fists to disrupt and disable their opponents.

CLASS FEATURES:

Advantages:

- Makes two additional attack rolls with each attack.
- Gains an extra use of Stunning Blow every 3 levels after level 1 instead of 4.
- May cast Windwalk twice per day.

WINDWALK: The Sky Dancer calls upon the force of the wind to transport them to another location, instantly teleporting them to any spot within range.

Disadvantages:

- All physical damage is reduced to 1/5 of its normal value (all weapons deal 80% less damage per hit).

- Hit Die: d8
~

LAF fl#add_kit_ee
	INT_VAR
		biography = RESOLVE_STR_REF (~~)
		briefdesc = RESOLVE_STR_REF (~Part magician and part artist, a Sky Dancer is a monk who uses telekinetic powers to influence their movements in combat. A Sky Dancer's powers come less from muscle and more from magic, allowing them to strike more often at the expense of reducing the force of each blow. Sky Dancers rely on the speed of their fists to disrupt and disable their opponents.~)
	STR_VAR
		kit_name = ~USAPR04~
		clswpbon = ~1 3 2~
		numwslot = ~3~
		clascolr = ~25 28 57 2 24~
		hpclass = ~HPPRS~
		clsrcreq = ~1 1 1 1 1 1 1~
		clasthac = ~0~
END

ADD_KIT ~USAPR0P~
	~USAPR0P 1 1 1 1 1 1 1 1~
      ~USAPR0P 0 1 0 0 1 0 0 1 0 1 2 1 0 2 2 2 1 1 1 0 0 1 2 0 0 1 1 0 2 2 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0~
	~USAPR0P 9 0 0 0 13 17~
	~USAPR0P 0 0 0 0 0 0~
	~USAPR0P 0 0 0 0 0 0~
        ~USAPR0P 0 0 0 0 0 0~
	~USAPR0P 1 0 0 0 0 0 0 0 0~
	~USAPR0P 0 0 0 0 0 0~
	~SwordDancerKit/CLABUSA5.2da~
	~K_P_H	K_P_D   K_P_G   K_P_E   K_P_HE   K_P_HL   K_P_HO~
	~0x00008000 6~
	~PA0~
	~LEAT12 * * BAG28 RING06 RING05 * BOOT01 AMUL19 BRAC16 BELT06 AROW11,40 BULL03,40 BOLT06,40 POTN52,5 POTN04,2 POTN14,5 DAGG12 SW1H28 STAF08~

	SAY ~sword dancer~
	SAY ~Sword Dancer~
	SAY ~Part magician and part artist, a Sword Dancer is a warrior who uses telekinetic powers to influence their movements in combat. A Sword Dancer's powers come less from muscle and more from magic, allowing them to strike more often at the expense of reducing the force of each blow. Sword Dancers rely on the speed of their weapons to disrupt and disable their opponents, and prefer to use lighter and quicker weapons, which are easier to move using telekinesis.

CLASS FEATURES:

Advantages:

- Makes two additional attack rolls with each attack (stacks with Haste and similar effects)
- May wield two weapons at once with no penalties

Disadvantages:

- All physical damage is reduced to 1/5 of its normal value (all weapons deal 80% less damage per hit)
- Can only attain Specialization (two points) in short swords, katanas, scimitars, daggers, and staffs
- Can only attain Proficiency (one point) in clubs, darts, spears, longswords, axes, war hammers, maces, and shortbows
- May not place any proficiency points in two-handed swords, bastard swords, halberds, flails, crossbows, longbows, or slings
- Cannot wear armor heavier than studded leather

- Hit Die: d8
~

LAF fl#add_kit_ee
	INT_VAR
		biography = RESOLVE_STR_REF (~~)
		briefdesc = RESOLVE_STR_REF (~Part magician and part artist, a Sword Dancer is a warrior who uses telekinetic powers to influence their movements in combat. A Sword Dancer's powers come less from muscle and more from magic, allowing them to strike more often at the expense of reducing the force of each blow. Sword Dancers rely on the speed of their weapons to disrupt and disable their opponents, and prefer to use lighter and quicker weapons, which are easier to move using telekinesis.~)
	STR_VAR
		kit_name = ~USAPR0P~
		clswpbon = ~1 0 2~
		numwslot = ~2~
		clascolr = ~35 67 67 25 80~
		hpclass = ~HPPRS~
		clsrcreq = ~1 1 1 1 1 1 1~
		clasthac = ~0~
END


COPY ~SwordDancerKit/ini/6512.ini~ ~override~
COPY ~SwordDancerKit/ini/6513.ini~ ~override~
COPY ~SwordDancerKit/ini/6514.ini~ ~override~
COPY ~SwordDancerKit/ini/6515.ini~ ~override~
COPY ~SwordDancerKit/ini/6516.ini~ ~override~
COPY ~SwordDancerKit/ini/6517.ini~ ~override~
COPY ~SwordDancerKit/ini/6518.ini~ ~override~
COPY ~SwordDancerKit/ini/6519.ini~ ~override~
COPY ~SwordDancerKit/ini/6520.ini~ ~override~
COPY ~SwordDancerKit/ini/6521.ini~ ~override~
COPY ~SwordDancerKit/ini/6522.ini~ ~override~
COPY ~SwordDancerKit/ini/6523.ini~ ~override~
COPY ~SwordDancerKit/ini/6524.ini~ ~override~
COPY ~SwordDancerKit/ini/6525.ini~ ~override~

COPY ~SwordDancerKit/spl/USAPR01.spl~ ~override~
COPY ~SwordDancerKit/spl/USAPRM1.spl~ ~override~
COPY ~SwordDancerKit/spl/USAPRM1A.spl~ ~override~
COPY ~SwordDancerKit/spl/USAPRM2.spl~ ~override~
COPY ~SwordDancerKit/spl/USAPRM3.spl~ ~override~
COPY ~SwordDancerKit/eff/USAPRM3A.eff~ ~override~
COPY ~SwordDancerKit/spl/USAPRM4.spl~ ~override~
COPY ~SwordDancerKit/spl/USAPRM4C.spl~ ~override~
  SAY NAME1 @12
  SAY NAME2 @12
  SAY UNIDENTIFIED_DESC @13
  SAY IDENTIFIED_DESC @13

COPY ~SwordDancerKit/spl/USAPRS00.spl~ ~override~
COPY ~SwordDancerKit/spl/USAPRS01.spl~ ~override~
COPY ~SwordDancerKit/eff/USAPRS01.eff~ ~override~
COPY ~SwordDancerKit/spl/USAPRS02.spl~ ~override~
COPY ~SwordDancerKit/eff/USAPRS02.eff~ ~override~
COPY ~SwordDancerKit/spl/USAPRS03.spl~ ~override~
COPY ~SwordDancerKit/eff/USAPRS03.eff~ ~override~
COPY ~SwordDancerKit/spl/USAPRSF.spl~ ~override~
COPY ~SwordDancerKit/spl/USAPRSM.spl~ ~override~
COPY ~SwordDancerKit/spl/USAPRS04.spl~ ~override~
COPY ~SwordDancerKit/eff/USAPRS04.eff~ ~override~
COPY ~SwordDancerKit/eff/USAPFMO.eff~ ~override~
COPY ~SwordDancerKit/eff/USAPMMO.eff~ ~override~
COPY ~SwordDancerKit/spl/USAPRS05.spl~ ~override~

COPY ~SwordDancerKit/eff/USAPRSM.eff~ ~override~
COPY ~SwordDancerKit/eff/USAPRSF.eff~ ~override~

COPY ~SwordDancerKit/eff/USAPFFDW.eff~ ~override~
COPY ~SwordDancerKit/eff/USAPFFEL.eff~ ~override~
COPY ~SwordDancerKit/eff/USAPFFGN.eff~ ~override~
COPY ~SwordDancerKit/eff/USAPFFHA.eff~ ~override~
COPY ~SwordDancerKit/eff/USAPFFHO.eff~ ~override~
COPY ~SwordDancerKit/eff/USAPFFHU.eff~ ~override~

COPY ~SwordDancerKit/eff/USAPFMDW.eff~ ~override~
COPY ~SwordDancerKit/eff/USAPFMEL.eff~ ~override~
COPY ~SwordDancerKit/eff/USAPFMGN.eff~ ~override~
COPY ~SwordDancerKit/eff/USAPFMHA.eff~ ~override~
COPY ~SwordDancerKit/eff/USAPFMHO.eff~ ~override~
COPY ~SwordDancerKit/eff/USAPFMHU.eff~ ~override~

// Using 3 APR versions of USDBASE bmp files

COPY ~SwordDancerKit/bmp/USDBASE1.bmp~ ~override~
COPY ~SwordDancerKit/bmp/USDBASE2.bmp~ ~override~
COPY ~SwordDancerKit/bmp/USDBASE3.bmp~ ~override~
COPY ~SwordDancerKit/bmp/USDBASE4.bmp~ ~override~
COPY ~SwordDancerKit/bmp/USDBASE5.bmp~ ~override~

COPY ~SwordDancerKit/spl/USAPR01.spl~ ~override~
COPY ~SwordDancerKit/spl/USAPR02.spl~ ~override~

COPY ~SwordDancerKit/spl/USAPR10.spl~ ~override~
  SAY NAME1 @2
  SAY NAME2 @2
  SAY UNIDENTIFIED_DESC @3
  SAY IDENTIFIED_DESC @3

COPY ~SwordDancerKit/spl/USAPR11.spl~ ~override~
  SAY NAME1 @8
  SAY NAME2 @8
  SAY UNIDENTIFIED_DESC @9
  SAY IDENTIFIED_DESC @9
COPY ~SwordDancerKit/spl/USAPR11D.spl~ ~override~

COPY ~SwordDancerKit/spl/USAPR12.spl~ ~override~
  SAY NAME1 @6
  SAY NAME2 @6
  SAY UNIDENTIFIED_DESC @7
  SAY IDENTIFIED_DESC @7
COPY ~SwordDancerKit/spl/USAPR12D.spl~ ~override~

COPY ~SwordDancerKit/spl/USAPR13.spl~ ~override~
  SAY NAME1 @10
  SAY NAME2 @10
  SAY UNIDENTIFIED_DESC @11
  SAY IDENTIFIED_DESC @11
COPY ~SwordDancerKit/spl/USAPR13D.spl~ ~override~

COPY ~SwordDancerKit/spl/USAPR14.spl~ ~override~
  SAY NAME1 @4
  SAY NAME2 @4
  SAY UNIDENTIFIED_DESC @5
  SAY IDENTIFIED_DESC @5
COPY ~SwordDancerKit/spl/USAPR14D.spl~ ~override~

COPY ~SwordDancerKit/spl/USAPR15.spl~ ~override~
  SAY NAME1 @0
  SAY NAME2 @0
  SAY UNIDENTIFIED_DESC @1
  SAY IDENTIFIED_DESC @1
COPY ~SwordDancerKit/spl/USAPR15D.spl~ ~override~


COPY ~SwordDancerKit/tables/LUUS7.2da~ ~override~


/*
// old method of replicating higher APR values

APPEND ~splprot.2da~ ~KIT_IS%TAB%152%TAB%-1%TAB%1~ UNLESS ~KIT_IS~

COPY_EXISTING ~splprot.2da~ ~override~
	COUNT_2DA_COLS cols
	READ_2DA_ENTRIES_NOW rows cols
	FOR (row = 1; row < rows; ++row) BEGIN
	  READ_2DA_ENTRY_FORMER rows row 0 ~stat~
	  PATCH_IF ~%stat%~ STRING_EQUAL_CASE ~KIT_IS~ BEGIN
	    SET kit_is_row = %row%
	  END
	END
BUT_ONLY

COPY_EXISTING_REGEXP GLOB ~^.+\.itm$~ ~override~
  PATCH_IF (~%SOURCE_SIZE%~ > ~0x71~) BEGIN
    READ_BYTE 0x31 prof
    PATCH_IF (%prof% = 115) BEGIN	// club proficiency
      LPF ADD_ITEM_EQEFFECT INT_VAR opcode = 248 target = 1 timing = 2 resist_dispel = 0 STR_VAR resource = ~USCLUBEF~ END
    END
    PATCH_IF (%prof% = 91) BEGIN	// short sword proficiency
      LPF ADD_ITEM_EQEFFECT INT_VAR opcode = 248 target = 1 timing = 2 resist_dispel = 0 STR_VAR resource = ~USDAGGEF~ END
    END
    PATCH_IF (%prof% = 96) BEGIN	// dagger proficiency
      LPF ADD_ITEM_EQEFFECT INT_VAR opcode = 248 target = 1 timing = 2 resist_dispel = 0 STR_VAR resource = ~USDAGGEF~ END
      LPF ADD_ITEM_EQEFFECT INT_VAR opcode = 249 target = 1 timing = 2 resist_dispel = 0 STR_VAR resource = ~USDAGGE2~ END
    END
    PATCH_IF (%prof% = 106) BEGIN	// dart proficiency
      LPF ADD_ITEM_EQEFFECT INT_VAR opcode = 249 target = 1 timing = 2 resist_dispel = 0 STR_VAR resource = ~USDARTEF~ END
    END
    PATCH_IF (%prof% = 94) BEGIN	// katana proficiency
      LPF ADD_ITEM_EQEFFECT INT_VAR opcode = 248 target = 1 timing = 2 resist_dispel = 0 STR_VAR resource = ~USSCIMEF~ END
    END
    PATCH_IF (%prof% = 90) BEGIN	// longsword proficiency
      LPF ADD_ITEM_EQEFFECT INT_VAR opcode = 248 target = 1 timing = 2 resist_dispel = 0 STR_VAR resource = ~USSCIMEF~ END
    END
    PATCH_IF (%prof% = 95) BEGIN	// scimitar proficiency
      LPF ADD_ITEM_EQEFFECT INT_VAR opcode = 248 target = 1 timing = 2 resist_dispel = 0 STR_VAR resource = ~USSCIMEF~ END
    END
    PATCH_IF (%prof% = 105) BEGIN	// shortbow proficiency
      LPF ADD_ITEM_EQEFFECT INT_VAR opcode = 249 target = 1 timing = 2 resist_dispel = 0 STR_VAR resource = ~USAROWEF~ END
    END
    PATCH_IF (%prof% = 102) BEGIN	// staff proficiency
      LPF ADD_ITEM_EQEFFECT INT_VAR opcode = 248 target = 1 timing = 2 resist_dispel = 0 STR_VAR resource = ~USCLUBEF~ END
    END
  END
BUT_ONLY

CREATE EFF ~USCLUBEF~
  WRITE_LONG 0x10 146
  WRITE_LONG 0x14 2
  WRITE_LONG 0x20 1
  WRITE_LONG 0x24 1
  WRITE_SHORT 0x2c 100
  WRITE_ASCII 0x30 ~USCLUBF1~ #8

COPY ~SwordDancerKit/USAPR.spl~ ~override/USCLUBF1.spl~ // *
  LPF ALTER_SPELL_HEADER INT_VAR target = 1 END
  LPF ADD_SPELL_EFFECT INT_VAR opcode = 326 target = 9 parameter1 = IDS_OF_SYMBOL (~Kit~ ~USAPR00~) parameter2 = %kit_is_row% timing = 1 STR_VAR resource = ~USCLUBF2~ END

COPY ~SwordDancerKit/spl/USCLUBF2.spl~ ~override~


CREATE EFF ~USSCIMEF~
  WRITE_LONG 0x10 146
  WRITE_LONG 0x14 2
  WRITE_LONG 0x20 1
  WRITE_LONG 0x24 1
  WRITE_SHORT 0x2c 100
  WRITE_ASCII 0x30 ~USSCIMF1~ #8

COPY ~SwordDancerKit/USAPR.spl~ ~override/USSCIMF1.spl~ // *
  LPF ALTER_SPELL_HEADER INT_VAR target = 1 END
  LPF ADD_SPELL_EFFECT INT_VAR opcode = 326 target = 9 parameter1 = IDS_OF_SYMBOL (~Kit~ ~USAPR00~) parameter2 = %kit_is_row% timing = 1 STR_VAR resource = ~USSCIMF2~ END

COPY ~SwordDancerKit/spl/USSCIMF2.spl~ ~override~


CREATE EFF ~USDAGGEF~
  WRITE_LONG 0x10 146
  WRITE_LONG 0x14 2
  WRITE_LONG 0x20 1
  WRITE_LONG 0x24 1
  WRITE_SHORT 0x2c 100
  WRITE_ASCII 0x30 ~USDAGGF1~ #8

COPY ~SwordDancerKit/USAPR.spl~ ~override/USDAGGF1.spl~ // *
  LPF ALTER_SPELL_HEADER INT_VAR target = 1 END
  LPF ADD_SPELL_EFFECT INT_VAR opcode = 326 target = 9 parameter1 = IDS_OF_SYMBOL (~Kit~ ~USAPR00~) parameter2 = %kit_is_row% timing = 1 STR_VAR resource = ~USDAGGF2~ END

COPY ~SwordDancerKit/spl/USDAGGF2.spl~ ~override~

CREATE EFF ~USDAGGE2~
  WRITE_LONG 0x10 146
  WRITE_LONG 0x14 2
  WRITE_LONG 0x20 1
  WRITE_LONG 0x24 1
  WRITE_SHORT 0x2c 100
  WRITE_ASCII 0x30 ~USDAGGF3~ #8

COPY ~SwordDancerKit/USAPR.spl~ ~override/USDAGGF3.spl~ // *
  LPF ALTER_SPELL_HEADER INT_VAR target = 1 END
  LPF ADD_SPELL_EFFECT INT_VAR opcode = 326 target = 9 parameter1 = IDS_OF_SYMBOL (~Kit~ ~USAPR00~) parameter2 = %kit_is_row% timing = 1 STR_VAR resource = ~USDAGGF4~ END

COPY ~SwordDancerKit/spl/USDAGGF4.spl~ ~override~
COPY ~SwordDancerKit/spl/USDAGGF5.spl~ ~override~


CREATE EFF ~USAROWEF~
  WRITE_LONG 0x10 146
  WRITE_LONG 0x14 2
  WRITE_LONG 0x20 1
  WRITE_LONG 0x24 1
  WRITE_SHORT 0x2c 100
  WRITE_ASCII 0x30 ~USAROWF1~ #8

COPY ~SwordDancerKit/USAPR.spl~ ~override/USAROWF1.spl~ // *
  LPF ALTER_SPELL_HEADER INT_VAR target = 1 END
  LPF ADD_SPELL_EFFECT INT_VAR opcode = 326 target = 9 parameter1 = IDS_OF_SYMBOL (~Kit~ ~USAPR00~) parameter2 = %kit_is_row% timing = 1 STR_VAR resource = ~USAROWF2~ END

COPY ~SwordDancerKit/spl/USAROWF2.spl~ ~override~
COPY ~SwordDancerKit/spl/USAROWF3.spl~ ~override~


CREATE EFF ~USDARTEF~
  WRITE_LONG 0x10 146
  WRITE_LONG 0x14 2
  WRITE_LONG 0x20 1
  WRITE_LONG 0x24 1
  WRITE_SHORT 0x2c 100
  WRITE_ASCII 0x30 ~USDARTF1~ #8

COPY ~SwordDancerKit/USAPR.spl~ ~override/USDARTF1.spl~ // *
  LPF ALTER_SPELL_HEADER INT_VAR target = 1 END
  LPF ADD_SPELL_EFFECT INT_VAR opcode = 326 target = 9 parameter1 = IDS_OF_SYMBOL (~Kit~ ~USAPR00~) parameter2 = %kit_is_row% timing = 1 STR_VAR resource = ~USDARTF2~ END

COPY ~SwordDancerKit/spl/USDARTF2.spl~ ~override~
COPY ~SwordDancerKit/spl/USDARTF3.spl~ ~override~

*/



////////////////////////////////////////
/////////SPELLS/////////////////////////
////////////////////////////////////////


COPY ~SwordDancerKit/spl/USAPR01.spl~ ~override~
COPY ~SwordDancerKit/spl/USAPR02.spl~ ~override~

COPY ~SwordDancerKit/spl/USAPR10.spl~ ~override~
  SAY NAME1 @2
  SAY NAME2 @2
  SAY UNIDENTIFIED_DESC @3
  SAY IDENTIFIED_DESC @3

COPY ~SwordDancerKit/spl/USAPR11.spl~ ~override~
  SAY NAME1 @8
  SAY NAME2 @8
  SAY UNIDENTIFIED_DESC @9
  SAY IDENTIFIED_DESC @9
COPY ~SwordDancerKit/spl/USAPR11D.spl~ ~override~

COPY ~SwordDancerKit/spl/USAPR12.spl~ ~override~
  SAY NAME1 @6
  SAY NAME2 @6
  SAY UNIDENTIFIED_DESC @7
  SAY IDENTIFIED_DESC @7
COPY ~SwordDancerKit/spl/USAPR12D.spl~ ~override~

COPY ~SwordDancerKit/spl/USAPR13.spl~ ~override~
  SAY NAME1 @10
  SAY NAME2 @10
  SAY UNIDENTIFIED_DESC @11
  SAY IDENTIFIED_DESC @11
COPY ~SwordDancerKit/spl/USAPR13D.spl~ ~override~

COPY ~SwordDancerKit/spl/USAPR14.spl~ ~override~
  SAY NAME1 @4
  SAY NAME2 @4
  SAY UNIDENTIFIED_DESC @5
  SAY IDENTIFIED_DESC @5
COPY ~SwordDancerKit/spl/USAPR14D.spl~ ~override~

COPY ~SwordDancerKit/spl/USAPR15.spl~ ~override~
  SAY NAME1 @0
  SAY NAME2 @0
  SAY UNIDENTIFIED_DESC @1
  SAY IDENTIFIED_DESC @1
COPY ~SwordDancerKit/spl/USAPR15D.spl~ ~override~


COPY ~SwordDancerKit/tables/LUUS7.2da~ ~override~

/*

 
// Removed this to speed up install times; this patches spells and items to grant immunity to the old HLA, Flying Blades.

COPY_EXISTING_REGEXP GLOB ~^.+\.spl$~ ~override~
  LPF CLONE_EFFECT 
    INT_VAR 
      silent = 1 
      multi_match = 1 
      match_opcode = 120
      match_parameter1 = 3
      match_parameter2 = 0
      opcode = 206 
      parameter1 = 0
      parameter2 = 0
    STR_VAR 
      resource = ~USAPR13~ 
  END 
BUT_ONLY_IF_IT_CHANGES

COPY_EXISTING_REGEXP GLOB ~^.+\.spl$~ ~override~
  LPF CLONE_EFFECT 
    INT_VAR 
      silent = 1 
      multi_match = 1 
      match_opcode = 120 
      match_parameter1 = 3
      match_parameter2 = 0
      opcode = 206 
      parameter1 = 0
      parameter2 = 0
    STR_VAR 
      resource = ~USAPR13D~ 
  END 
BUT_ONLY_IF_IT_CHANGES

COPY_EXISTING_REGEXP GLOB ~^.+\.spl$~ ~override~
  LPF CLONE_EFFECT 
    INT_VAR 
      silent = 1 
      multi_match = 1 
      match_opcode = 120
      match_parameter1 = 0
      match_parameter2 = 1
      opcode = 206 
      parameter1 = 0
      parameter2 = 0
    STR_VAR 
      resource = ~USAPR13~ 
  END 
BUT_ONLY_IF_IT_CHANGES

COPY_EXISTING_REGEXP GLOB ~^.+\.spl$~ ~override~
  LPF CLONE_EFFECT 
    INT_VAR 
      silent = 1 
      multi_match = 1 
      match_opcode = 120 
      match_parameter1 = 0
      match_parameter2 = 1
      opcode = 206 
      parameter1 = 0
      parameter2 = 0
    STR_VAR 
      resource = ~USAPR13D~ 
  END 
BUT_ONLY_IF_IT_CHANGES

////

COPY_EXISTING_REGEXP GLOB ~^.+\.itm$~ ~override~
  LPF CLONE_EFFECT 
    INT_VAR 
      silent = 1 
      multi_match = 1 
      match_opcode = 120
      match_parameter1 = 3
      match_parameter2 = 0
      opcode = 206 
      parameter1 = 0
      parameter2 = 0
    STR_VAR 
      resource = ~USAPR13~ 
  END 
BUT_ONLY_IF_IT_CHANGES

COPY_EXISTING_REGEXP GLOB ~^.+\.itm$~ ~override~
  LPF CLONE_EFFECT 
    INT_VAR 
      silent = 1 
      multi_match = 1 
      match_opcode = 120 
      match_parameter1 = 3
      match_parameter2 = 0
      opcode = 206 
      parameter1 = 0
      parameter2 = 0
    STR_VAR 
      resource = ~USAPR13D~ 
  END 
BUT_ONLY_IF_IT_CHANGES

COPY_EXISTING_REGEXP GLOB ~^.+\.itm$~ ~override~
  LPF CLONE_EFFECT 
    INT_VAR 
      silent = 1 
      multi_match = 1 
      match_opcode = 120
      match_parameter1 = 0
      match_parameter2 = 1
      opcode = 206 
      parameter1 = 0
      parameter2 = 0
    STR_VAR 
      resource = ~USAPR13~ 
  END 
BUT_ONLY_IF_IT_CHANGES

COPY_EXISTING_REGEXP GLOB ~^.+\.itm$~ ~override~
  LPF CLONE_EFFECT 
    INT_VAR 
      silent = 1 
      multi_match = 1 
      match_opcode = 120 
      match_parameter1 = 0
      match_parameter2 = 1
      opcode = 206 
      parameter1 = 0
      parameter2 = 0
    STR_VAR 
      resource = ~USAPR13D~ 
  END 
BUT_ONLY_IF_IT_CHANGES


*/

/*


COPY_EXISTING_REGEXP GLOB ~^.+\.itm$~ ~override~
  PATCH_IF (~%SOURCE_SIZE%~ > ~0x71~) BEGIN
    READ_BYTE 0x31 prof
    PATCH_IF (%prof% = 115) BEGIN	// club proficiency
      LPF ADD_ITEM_EQEFFECT INT_VAR opcode = 248 target = 1 timing = 2 resist_dispel = 0 STR_VAR resource = ~USCLUBEF~ END
    END
    PATCH_IF (%prof% = 96) BEGIN	// dagger proficiency
      LPF ADD_ITEM_EQEFFECT INT_VAR opcode = 249 target = 1 timing = 2 resist_dispel = 0 STR_VAR resource = ~USDAGGEF~ END
    END
    PATCH_IF (%prof% = 96) OR	// dagger proficiency
                (%prof% = 91) BEGIN	// short sword
      LPF ADD_ITEM_EQEFFECT INT_VAR opcode = 248 target = 1 timing = 2 resist_dispel = 0 STR_VAR resource = ~USDAGGEF~ END
    END
    PATCH_IF (%prof% = 102) BEGIN	// staff proficiency
      LPF ADD_ITEM_EQEFFECT INT_VAR opcode = 248 target = 1 timing = 2 resist_dispel = 0 STR_VAR resource = ~USSTAFEF~ END
    END
    PATCH_IF (%prof% = 106) BEGIN	// dart proficiency
      LPF ADD_ITEM_EQEFFECT INT_VAR opcode = 249 target = 1 timing = 2 resist_dispel = 0 STR_VAR resource = ~USDARTEF~ END
    END
    PATCH_IF (%prof% = 94) BEGIN	// katana proficiency
      LPF ADD_ITEM_EQEFFECT INT_VAR opcode = 248 target = 1 timing = 2 resist_dispel = 0 STR_VAR resource = ~USKATAEF~ END
    END
    PATCH_IF (%prof% = 90) BEGIN	// longsword proficiency
      LPF ADD_ITEM_EQEFFECT INT_VAR opcode = 248 target = 1 timing = 2 resist_dispel = 0 STR_VAR resource = ~USLSWEF~ END
    END
    PATCH_IF (%prof% = 95) BEGIN	// scimitar proficiency
      LPF ADD_ITEM_EQEFFECT INT_VAR opcode = 248 target = 1 timing = 2 resist_dispel = 0 STR_VAR resource = ~USSCIMEF~ END
    END
    PATCH_IF (%prof% = 105) BEGIN	// shortbow proficiency
      LPF ADD_ITEM_EQEFFECT INT_VAR opcode = 249 target = 1 timing = 2 resist_dispel = 0 STR_VAR resource = ~USSBOWEF~ END
    END
  END
BUT_ONLY

*/
