obj
var
Strength
Swords
icon = 'Weapons.dmi'
Short_Sword
icon_state = "Short Sword"
name = "Short Sword"
Strength = 3
Broad_Sword
icon_state = "Broad Sword"
name = "Broad Sword"
Strength = 5
Venom_Blade
icon_state = "Venomous Blade"
name = "Venom Blade"
Strength = 8
Claymore
icon_state = "Claymore"
name = "Claymore"
Strength = 15
GM_Blade
icon_state = "GM Blade"
name = "GM Blade"
Strength = 100
verb/Get()
set src in oview(0)
src.Move(usr)
view() << "[usr] picks up \a [src]"
verb/Drop()
set src in usr
if (suffix == "(Equipped)")
usr << "You can not Drop this while its being used."
return
if(name=="Short Sword")
view()<<"You Drop [src]"
new/obj/Swords/Short_Sword(usr.loc)
del src
if(name=="Broad Sword")
view()<<"You Drop [src]"
new/obj/Swords/Broad_Sword(usr.loc)
del src
if(name=="Venom Blade")
view()<<"You Drop [src]"
new/obj/Swords/Venom_Blade(usr.loc)
del src
if(name=="Claymore")
view()<<"You Drop [src]"
new/obj/Swords/Claymore(usr.loc)
del src
DblClick()
if (!src.suffix)
for (var/obj/Swords/W in usr)
if (W.suffix == "(Equipped)")
usr << "You remove your [W]."
W.suffix = null
usr.WEquip = null
usr.Str -= W.Strength
usr << "You equip your [src]."
usr.Str += Strength
src.suffix = "(Equipped)"
else
usr << "You remove your [src]."
src.suffix = null
Problem description:Ok for some Reason when i unequip one of the following swords it doesnt subtracts its Defense bonus from my Def how can I fix this?
Also, instead of creating a new item everytime you drop, just do this: src.Move(usr.loc) ... >.>
- GhostAnime
Edit: What I meant by the first paragraph/line is that you should add the bonuses in the verb rather in the DblClick()