[ITEMDEF i_barding_deed]
ID=i_deed
NAME=Dragon Barding Deed
TYPE=T_NORMAL
RESOURCES=750 i_ingot_iron
SKILLMAKE=72.5 SKILL_BLACKSMITH
VALUE=5000

ON=@Dclick
TARGET @,,2 1053024
RETURN 1

ON=@Targon_Item
SRC.SYSMESSAGELOC -1,1053025 //That is not an unarmored swamp dragon.

ON=@Targon_Char
REF1=<SRC.TARG.UID>
IF (<REF1.OBODY> != c_swamp_dragon)
SRC.SYSMESSAGELOC -1,1053025 //That is not an unarmored swamp dragon.
ELIF (!(<REF1.ISMYPET>))
SRC.SYSMESSAGELOC -1,1053026 //You can only put barding on a tamed swamp dragon that you own.
ELSE
SRC.SYSMESSAGELOC -1,1053027 //You place the barding on your swamp dragon.  Use a bladed item on your dragon to remove the armor.
REF1.BODY C_ARMORED_SWAMP_DRAGON
REF1.OBODY C_ARMORED_SWAMP_DRAGON
REF1.COLOR=<COLOR>
REF1.UPDATEX
REF1.TAG.BARDINGEFFECT=10
	IF (<QUALITY> == 200)
	REF1.TAG.BARDINGEFFECT=20
	ENDIF
CONSUME 1
ENDIF
RETURN 1

[EOF]