forked from rDrama/rDrama
fix vamp bug
parent
bde73fc665
commit
064918acd0
|
@ -71,10 +71,9 @@ def award_timers(v, bot=False):
|
||||||
badge = v.has_badge(168)
|
badge = v.has_badge(168)
|
||||||
if badge: g.db.delete(badge)
|
if badge: g.db.delete(badge)
|
||||||
|
|
||||||
if "Vampire" not in v.old_house:
|
|
||||||
v.house = v.old_house
|
v.house = v.old_house
|
||||||
v.old_house = ''
|
|
||||||
notify_if_not_bot(f"Your vampire status has ended. You're now back in House {v.old_house.replace(' Founder', '')}!")
|
notify_if_not_bot(f"Your vampire status has ended. You're now back in House {v.old_house.replace(' Founder', '')}!")
|
||||||
|
v.old_house = ''
|
||||||
|
|
||||||
if v.earlylife and v.earlylife < now:
|
if v.earlylife and v.earlylife < now:
|
||||||
v.earlylife = None
|
v.earlylife = None
|
||||||
|
|
|
@ -409,12 +409,13 @@ def award_thing(v, thing_type, id):
|
||||||
g.db.add(thing)
|
g.db.add(thing)
|
||||||
elif "Vampire" in kind and kind == v.house:
|
elif "Vampire" in kind and kind == v.house:
|
||||||
if author.bite: author.bite += 172800
|
if author.bite: author.bite += 172800
|
||||||
else: author.bite = int(time.time()) + 172800
|
else:
|
||||||
|
if v.house.startswith("Vampire"):
|
||||||
|
abort(400, f"{safe_username} is already a permanent vampire!")
|
||||||
|
|
||||||
if 'Vampire' not in author.house:
|
author.bite = int(time.time()) + 172800
|
||||||
if not author.old_house:
|
v.old_house = v.house
|
||||||
author.old_house = author.house
|
v.house = "Vampire"
|
||||||
author.house = 'Vampire'
|
|
||||||
|
|
||||||
badge_grant(user=author, badge_id=168)
|
badge_grant(user=author, badge_id=168)
|
||||||
elif "Racist" in kind and kind == v.house:
|
elif "Racist" in kind and kind == v.house:
|
||||||
|
|
Loading…
Reference in New Issue