Skip to content

Commit

Permalink
Improved Equalizer: first swing at #15.
Browse files Browse the repository at this point in the history
  • Loading branch information
burner1024 committed Feb 21, 2020
1 parent 17ba875 commit 8b25425
Show file tree
Hide file tree
Showing 4 changed files with 85 additions and 0 deletions.
54 changes: 54 additions & 0 deletions tnt/components/improved_equalizer/main.tpa
@@ -0,0 +1,54 @@
OUTER_SET probability1 = 99
OUTER_SET timing = TIMING_while_equipped
OUTER_SET target = TARGET_eff_self
ACTION_FOR_EACH i IN 1 2 3 4 BEGIN // thac0+damage bonus. 0 against TN, so not included
LAF CREATE_EFFECT
INT_VAR
opcode = OPCODE_thac0_mod
parameter1 = ~%i%~ // amount
STR_VAR
effect = EVAL ~g_equat%i%~ //thac0
END
OUTER_SET dmg = i * 2
LAF CREATE_EFFECT
INT_VAR
opcode = OPCODE_extra_damage_mod
parameter1 = EVAL ~%dmg%~
STR_VAR
effect = EVAL ~g_equad%i%~ //damage
END
END

COPY_EXISTING ~sw1h54.itm~ ~override~
SAY DESC @1

LPF DELETE_ITEM_EFFECT INT_VAR opcode = OPCODE_use_eff_file END //delete all alignment effects

OUTER_SET opcode = OPCODE_use_eff_file
OUTER_SET target = TARGET_FEATURE_self
OUTER_SET timing = TIMING_while_equipped
OUTER_SET parameter2 = EFFECT_IDS_align

ACTION_DEFINE_ASSOCIATIVE_ARRAY align_effnum BEGIN
LAWFUL_NEUTRAL => 1
CHAOTIC_NEUTRAL => 1
NEUTRAL_GOOD => 2
NEUTRAL_EVIL => 2
CHAOTIC_GOOD => 3
LAWFUL_EVIL => 3
LAWFUL_GOOD => 4
CHAOTIC_EVIL => 4
END
ACTION_PHP_EACH align_effnum AS align => i BEGIN
LPF ADD_ITEM_EQEFFECT
INT_VAR parameter1 = IDS_OF_SYMBOL (~align~ ~%align%~)
STR_VAR resource = "g_equat%i%"
END
LPF ADD_ITEM_EQEFFECT
INT_VAR parameter1 = IDS_OF_SYMBOL (~align~ ~%align%~)
STR_VAR resource = "g_equad%i%"
END
END

WRITE_LONG ITM_enchantment 4
BUT_ONLY
4 changes: 4 additions & 0 deletions tnt/tnt.tp2
Expand Up @@ -381,3 +381,7 @@ INCLUDE ~%components%/sensible_multiclass_restrictions/main.tpa~

//BEGIN @259 /* Faster loading times */
//INCLUDE ~%components%/faster_loading_times/main.tpa~

BEGIN @260 /* Improved Equalizer */
OUTER_SPRINT comp_name ~improved_equalizer~
WITH_TRA ~%lang_dir%/%comp_name%.tra~ BEGIN INCLUDE ~%components%/%comp_name%/main.tpa~ END
26 changes: 26 additions & 0 deletions tnt/tra/english/improved_equalizer.tra
@@ -0,0 +1,26 @@
@1 = ~Long Sword: The Equalizer
The age of this sword is such that its true origin has been lost to time, but markings hint that it was possibly forged by those in the service of Helm. Also called the "Sword of Neutrality," it seems designed to seek and terminate extremism, to shift the universe closer to harmonious equilibrium. The further the orientation of a target from true balance, the more potent the damage they suffer.

STATISTICS:

Always considered to be of +4 enchantment when determining what it can hit.
THAC0 & Damage:
vs True Neutral: +0 to hit, +0 damage
vs Chaotic Neutral, Lawful Neutral: +1 to hit, +2 damage
vs Neutral Good, Neutral Evil: +2 to hit, +4 damage
vs Chaotic Good, Lawful Evil: +3 to hit, +6 damage
vs Lawful Good, Chaotic Evil: +4 to hit, +8 damage

Equipped Abilities: Immunity to Charm and Confusion

Damage type: slashing
Weight: 3
Speed Factor: 3
Proficiency Type: Long Sword
Type: 1-handed
Requires: 6 Strength
Not Usable By:
Druid
Cleric
Mage
Beast Master~
1 change: 1 addition & 0 deletions tnt/tra/english/setup.tra
Expand Up @@ -100,3 +100,4 @@
@257 = ~True True Grandmastery~
@258 = ~Sensible multiclass restrictions~
@259 = ~Faster loading times~
@260 = ~Improved Equalizer~

0 comments on commit 8b25425

Please sign in to comment.