Skip to content

Commit

Permalink
exz
Browse files Browse the repository at this point in the history
  • Loading branch information
scionalu authored Oct 11, 2023
1 parent 6a9d7d2 commit e0a2497
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
. += "Spend [charge]/[charge_cost] charge to [charge_effect]"

/obj/item/ego_weapon/city/charge/attack(mob/living/target, mob/living/user)
..()
if(!CanUseEgo(user))
return
. = ..()
if(!.)
return FALSE
if(charge<20 && target.stat != DEAD)
charge+=1

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
/obj/item/ego_weapon/city/charge/cane/attack_self(mob/user)
..()
if(!CanUseEgo(user))
return
return FALSE
if(charge>=charge_cost)
var/target //Didn't even need new var, could literally put anything for first arg, but for consistency sake and less confusion
release_charge(target, user)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@
qdel(I)

/obj/item/ego_weapon/city/charge/rosespanner/attack(mob/living/target, mob/living/user)
..()
if(!CanUseEgo(user))
return
. = ..()
if(!.)
return FALSE
if(charge == 20)
overcharged = TRUE
activated = TRUE
Expand Down
10 changes: 5 additions & 5 deletions code/game/objects/items/ego_weapons/non_abnormality/wcorp.dm
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
to_chat(user, "<span class='notice'>You don't have enough charge.</span>")

/obj/item/ego_weapon/city/charge/wcorp/attack(mob/living/target, mob/living/user)
..()
if(!CanUseEgo(user))
return
. = ..()
if(!.)
return FALSE
if(activated)
release_charge(target, user)
activated = FALSE
Expand Down Expand Up @@ -307,9 +307,9 @@
attack_speed = 1.5

/obj/item/ego_weapon/city/charge/wcorp/shield/club/attack(mob/living/target, mob/living/user)
if(!CanUseEgo(user))
return
. = ..()
if(!.)
return FALSE
var/atom/throw_target = get_edge_target_turf(target, user.dir)
if(!target.anchored)
var/whack_speed = (prob(60) ? 1 : 4)
Expand Down
20 changes: 10 additions & 10 deletions code/game/objects/items/ego_weapons/subtype/charge.dm
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
. += "Spend [charge]/[charge_cost] charge to [charge_effect]"

/obj/item/ego_weapon/charge/attack(mob/living/target, mob/living/user)
..()
if(!CanUseEgo(user))
return
. = ..()
if(!.)
return FALSE
if((target.stat == DEAD) || (GODMODE in target.status_flags))//if the target is dead or godmode
return
return FALSE
if(charge<20)
charge+=1

Expand All @@ -40,9 +40,9 @@
to_chat(user, "<span class='notice'>You don't have enough charge.</span>")

/obj/item/ego_weapon/charge/onattack/attack(mob/living/target, mob/living/user)
..()
if(!CanUseEgo(user))
return
. = ..()
if(!.)
return FALSE
if(activated)
charge -= charge_cost
to_chat(user, "<span class='notice'>[release_message].</span>")
Expand All @@ -52,9 +52,9 @@

//On use Subtype
/obj/item/ego_weapon/charge/onuse/attack_self(mob/user)
..()
if(!CanUseEgo(user))
return
. = ..()
if(!.)
return FALSE
if(charge>=charge_cost)
charge -= charge_cost
to_chat(user, "<span class='notice'>[release_message].</span>")
Expand Down

0 comments on commit e0a2497

Please sign in to comment.