Skip to content

Commit f798aff

Browse files
committed
Updated debuffs and interaction logic.
1 parent b825bec commit f798aff

File tree

8 files changed

+48
-50
lines changed

8 files changed

+48
-50
lines changed

data/prefab.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
dct['gate-']="You shut down the gate." #
2626
dct['atgate']="You are standing in the gate." #
2727
dct['trap-']="You eliminate the trap. Exp +5" #
28+
dct['trapx']="Failed to eliminate the trap." #
2829
dct['boxtrap']="You have triggered a spike trap." #
2930
dct['bless']="Blessed by Lord Enigma I, you feel energetic."
3031
dct['bless-']="You are out of health to make a pray to the Lord."
@@ -101,7 +102,7 @@
101102
dct['berserker']="Berserker can not use "
102103
dct['archer']="Archer can not use "
103104
dct['sorcerer']="Sorcerer can not use "
104-
dct['potionx']="No potion in take in 20 steps for potion sickness."
105+
dct['potionx']="No potion in take in 30 steps for potion sickness."
105106
#模式信息触发:
106107
dct['cursor']="You open up infomation cursor, select a target." #
107108
dct['attack']="You are using attacking mode, select a target." #

data/prefabs.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"stair+": "Now you see a dark stair leading upwards.", "stair-": "Now you see a dark stair leading downwards.", "out": "Mendax canyon, the fresh air fills in your lungs.", "block": "You can not reach the blocked place.", "trap": "You accidentally walked into a trap and fell down.", "spike": "You are stung by the spikes trap.", "summon": "There are foul creatures summoned by you.", "tp": "Once again you are lost in the dungeon.", "box": "Now beneath you is a treasure box.", "box-": "You open up the box, and it is empty.", "box0": "Now beneath you is an empty treasure box.", "boxg": "Now beneath you is a box of gold coins.", "door+": "You opened the closed door.", "door-": "You closed the open door.", "doorx": "With a terrible noise, the door became scraps.", "door#": "You unlock the door with a key.", "door!": "You have no keys to open this lock.", "atdoor": "You are standing in the door.", "atdoorx": "You are standing in the broken door.", "gate+": "You raise the gate.", "gate-": "You shut down the gate.", "atgate": "You are standing in the gate.", "trap-": "You eliminate the trap.", "boxtrap": "You have triggered a spike trap.", "bless": "Blessed by Lord Enigma I, you feel energetic.", "bless-": "You are out of health to make a pray to the Lord.", "door&": "The door is locked, you need a key.", "&door": "You locked up the door with a lock.", "door&-": "You opened the locked door with a key.", "poison": "You have been poisoned by ", "fire": "There are flames upon your body.", "blind": "The dungeon looks dimmer to you.", "frozen": "The coldness is like daggers scraping your bones.", "break": "Your armor is shattered by ", "bleed": "You throw at the potion you drink for the dark magic.", "dying": "You have bled too much. Find some cure or you will die.", "mfire": "You set fire on ", "mpoison": "You put poison on ", "mdrain": "You have drain some blood from ", "mcharm": "is charmed by you.", "mfrozen": "is frozen by ice sorcery.", "mbreak": "You break the armor of !!!!!!!!!!!!!!!!", "mcurse": "is cursed by you.", "mfright": "is scared away by you.", "mback": "You knock back the attack of ", "mdizzy": "feels dizzy right now.", "mchao": "You put chaotic spells on ", "targetx": "The target is blocked, you can not aim at it.", "tps": "You have used the sorcery of teleportation.", "map": "Darkness is blinding you no more.", "summonWand": "You summoned yourself some friendly monsters.", "bkscroll": "You return to the deepest the level you ever reached.", "no": "Nothing seems to happen.", "enchant": "Beams of light flow inside the scroll...", "decay": "The gleaming lights seem to fade...", "lvl6x": "Maximum Level: 6 reached.", "lvl0x": "Minimum Level: 0 reached.", "lvl6-": "Level 6 item shall not decay.", "cure": "You cure yourself with potion. HP +", "poison-": "You freed yourself from the grasp of poison.", "atk+": "You swing the weapon with more might even. Attack +", "atk-": "The weapon in hand seems heavier to you. Attack -", "defc+": "You hardened your skin and armor. Defence +", "defc-": "You are more vulnerable to attack. Defence -", "mgc+": "Your faith has been tested and strengthened. Magic +", "mgc-": "Your spiritual power begins to shake. Magic -", "spd+": "You feel that your have silk steps. Speed +", "spd-": "It seems there was lump of steel in your boots. Speed -", "cureWandm": "is cured by you.", "cureWand": "Your wounds start to heal and you cure yourself.", "knowledge": "You have used the Scroll of Knowledge.", "stare": "is staring at you.", "mcure": "cures itself.", "mtp": "is frightened and teleported itself.", "wake": "is woken up by you.", "drain": "Your blood has been drained.", "dodge": "You have dodged the attack from ", "miss": "misses hitting you when attacking.", "missmob": "Your attack misses hitting ", "swap": "You switch the position with ", "shaman": "Shaman's healing bell is ringing...", "slime": "divides itself into two...", "msummon": "Devils are summoned by ", "stand": "Now you are standing on some item...", "pickup": "You pick up ", "ovrw": "Outweighted! Need more space in the bag.", "throw": "You throw away ", "throwx": "You can't drop multiple weighed items at once.", "occupied": "There is already something on the floor.", "eq": "You equip yourself with ", "deq": "You take down ", "berserker": "Berserker can not use ", "archer": "Archer can not use ", "sorcerer": "Sorcerer can not use ", "potionx": "No potion in take in 20 steps for potion sickness.", "cursor": "You open up infomation cursor, select a target.", "attack": "You are using attacking mode, select a target.", "sm": "Satellite map activated.", "dsm": "Satellite map de-activated.", "wand0": "You have no wand equipped.", "b0": "You have no book or long range weapon equipped.", "a0": "You have no arrow left or equipped.", "saved": "The game record is saved.", "loaded": "The game record is retrieved.", "$x": "You don't have that much money.", "heavy": "You can not take that many things with you.", "new!": "You found something new around you!"}
1+
{"stair+": "Now you see a dark stair leading upwards.", "stair-": "Now you see a dark stair leading downwards.", "out": "Mendax canyon, the fresh air fills in your lungs.", "block": "You can not reach the blocked place.", "trap": "You accidentally walked into a trap and fell down.", "spike": "You are stung by the spikes trap.", "summon": "There are foul creatures summoned by you.", "tp": "Once again you are lost in the dungeon.", "box": "Now beneath you is a treasure box.", "box-": "You open up the box, and it is empty.", "box0": "Now beneath you is an empty treasure box.", "boxg": "Now beneath you is a box of gold coins.", "door+": "You opened the closed door.", "door-": "You closed the open door.", "doorx": "With a terrible noise, the door became scraps.", "door#": "You unlock the door with a key.", "door!": "You have no keys to open this lock.", "atdoor": "You are standing in the door.", "atdoorx": "You are standing in the broken door.", "gate+": "You raise the gate.", "gate-": "You shut down the gate.", "atgate": "You are standing in the gate.", "trap-": "You eliminate the trap.", "trapx":"Failed to eliminate the trap.", "boxtrap": "You have triggered a spike trap.", "bless": "Blessed by Lord Enigma I, you feel energetic.", "bless-": "You are out of health to make a pray to the Lord.", "door&": "The door is locked, you need a key.", "&door": "You locked up the door with a lock.", "door&-": "You opened the locked door with a key.", "poison": "You have been poisoned by ", "fire": "There are flames upon your body.", "blind": "The dungeon looks dimmer to you.", "frozen": "The coldness is like daggers scraping your bones.", "break": "Your armor is shattered by ", "bleed": "You throw at the potion you drink for the dark magic.", "dying": "You have bled too much. Find some cure or you will die.", "mfire": "You set fire on ", "mpoison": "You put poison on ", "mdrain": "You have drain some blood from ", "mcharm": "is charmed by you.", "mfrozen": "is frozen by ice sorcery.", "mbreak": "You break the armor of !!!!!!!!!!!!!!!!", "mcurse": "is cursed by you.", "mfright": "is scared away by you.", "mback": "You knock back the attack of ", "mdizzy": "feels dizzy right now.", "mchao": "You put chaotic spells on ", "targetx": "The target is blocked, you can not aim at it.", "tps": "You have used the sorcery of teleportation.", "map": "Darkness is blinding you no more.", "summonWand": "You summoned yourself some friendly monsters.", "bkscroll": "You return to the deepest the level you ever reached.", "no": "Nothing seems to happen.", "enchant": "Beams of light flow inside the scroll...", "decay": "The gleaming lights seem to fade...", "lvl6x": "Maximum Level: 6 reached.", "lvl0x": "Minimum Level: 0 reached.", "lvl6-": "Level 6 item shall not decay.", "cure": "You cure yourself with potion. HP +", "poison-": "You freed yourself from the grasp of poison.", "atk+": "You swing the weapon with more might even. Attack +", "atk-": "The weapon in hand seems heavier to you. Attack -", "defc+": "You hardened your skin and armor. Defence +", "defc-": "You are more vulnerable to attack. Defence -", "mgc+": "Your faith has been tested and strengthened. Magic +", "mgc-": "Your spiritual power begins to shake. Magic -", "spd+": "You feel that your have silk steps. Speed +", "spd-": "It seems there was lump of steel in your boots. Speed -", "cureWandm": "is cured by you.", "cureWand": "Your wounds start to heal and you cure yourself.", "knowledge": "You have used the Scroll of Knowledge.", "stare": "is staring at you.", "mcure": "cures itself.", "mtp": "is frightened and teleported itself.", "wake": "is woken up by you.", "drain": "Your blood has been drained.", "dodge": "You have dodged the attack from ", "miss": "misses hitting you when attacking.", "missmob": "Your attack misses hitting ", "swap": "You switch the position with ", "shaman": "Shaman's healing bell is ringing...", "slime": "divides itself into two...", "msummon": "Devils are summoned by ", "stand": "Now you are standing on some item...", "pickup": "You pick up ", "ovrw": "Outweighted! Need more space in the bag.", "throw": "You throw away ", "throwx": "You can't drop multiple weighed items at once.", "occupied": "There is already something on the floor.", "eq": "You equip yourself with ", "deq": "You take down ", "berserker": "Berserker can not use ", "archer": "Archer can not use ", "sorcerer": "Sorcerer can not use ", "potionx": "No potion in take in 30 steps for potion sickness.", "cursor": "You open up infomation cursor, select a target.", "attack": "You are using attacking mode, select a target.", "sm": "Satellite map activated.", "dsm": "Satellite map de-activated.", "wand0": "You have no wand equipped.", "b0": "You have no book or long range weapon equipped.", "a0": "You have no arrow left or equipped.", "saved": "The game record is saved.", "loaded": "The game record is retrieved.", "$x": "You don't have that much money.", "heavy": "You can not take that many things with you.", "new!": "You found something new around you!"}

equipment/equipfunc.py

Lines changed: 5 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -191,13 +191,9 @@ def passby(self): #没事干函数
191191
self.gui.quitSetter()
192192

193193
def heal(self, tag): #5:恢复生命(中)
194-
if not self.ptr.bleeding:
194+
if not self.ptr.potion_sick:
195195
hold = int(self.ptr.maxhp_getter() / 4)
196196
if self.ptr.hp_getter() <= hold: # 濒死状态加成
197-
judge = True
198-
else:
199-
judge = False
200-
if judge:
201197
hp = 6 + (tag - 1) * 4
202198
if self.ptr.hp_getter() + hp > self.ptr.maxhp_getter():
203199
self.ptr.hp_setter(self.ptr.maxhp_getter())
@@ -209,7 +205,8 @@ def heal(self, tag): #5:恢复生命(中)
209205
self.ptr.hp_setter(self.ptr.maxhp_getter())
210206
else:
211207
self.ptr.hp_adder(hp)
212-
self.ptr.setStat(7, 20) #药剂恶心效果
208+
self.potion_sick = True
209+
self.ptr.setStat(7, 30) #药剂恶心效果
213210
self.inf.prefabTell('potionx')
214211
self.inf.prefabTell('cure', back=hp)
215212
else:
@@ -222,6 +219,8 @@ def dePoison(self): #8:解毒
222219
self.inf.prefabTell('poison-')
223220
self.ptr.setStat(1, 0)
224221
self.heal(1)
222+
self.gui.quitSetter()
223+
self.gui.quitSetter()
225224

226225
def strength(self): #9:强壮药剂
227226
self.inf.prefabTell('atk+', back=1)
@@ -313,7 +312,6 @@ def knowledge(self): #19:知识卷轴
313312
self.ptr.exp_setter(self.ptr.need_getter() + diff)
314313
self.inf.prefabTell('no')
315314

316-
317315
def locker(self): #20:锁
318316
lst=[]
319317
for i in range(-1, 2):
@@ -326,21 +324,3 @@ def locker(self): #20:锁
326324
self.inf.prefabTell('&door')
327325
self.gui.quitSetter()
328326
self.gui.quitSetter()
329-
330-
331-
332-
333-
334-
335-
336-
337-
338-
339-
340-
341-
342-
343-
344-
345-
346-

loop_module/loop10.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def __init__(self, surface, ptr):
5151
self.texts=[]
5252
self.mode=0 #绘制界面模式标值(0是玩家信息,1是统计信息)
5353
self.killDict={} #杀死怪物统计
54-
self.str_dict={'Left':(708, 320), 'Right':(456, 320), 'Head':(540, 236), 'Armoos.path.join(":(540, 320), ")Leg':(540, 404), 'Necklace':(456, 236),
54+
self.str_dict={'Left':(708, 320), 'Right':(456, 320), 'Head':(540, 236), 'Armor':(540, 320), 'Leg':(540, 404), 'Necklace':(456, 236),
5555
'Ring':(456, 404), 'Feet':(624, 404), 'Wand':(708, 404), 'Cape':(624, 320), 'Amulet':(624, 236), 'Dual':0, 'Book':(708, 236)}
5656

5757
def getInfo(self): #获取信息

src/monster.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ def tagEffect(self): #怪物特殊攻击效果
307307
self.ptr.setStat(6, 80-20*self.ptr.iceR)
308308
if 80 - 20 * self.ptr.iceR: self.inf.prefabTell('frozen')
309309
if not self.ptr.frozen: #只能冻住没冻住的玩家,已经冻住的玩家只会重设时间
310-
self.ptr.speed_adder(-10)
310+
self.ptr.speed_adder(-15)
311311
self.ptr.frozen=True
312312
elif tag==1: self.bloodSteal() #有概率偷取生命
313313
# 66%概率生命偷取
@@ -318,10 +318,10 @@ def tagEffect(self): #怪物特殊攻击效果
318318
self.ptr.hp_adder(-3)
319319
# 药剂反胃效果
320320
if 7 in self.tags:
321-
self.inf.prefabTell('bleed')
321+
self.inf.prefabTell('pointx')
322322
if self.cc.fixChoice(4): #50%
323323
self.ptr.setStat(7, 50)
324-
self.ptr.bleeding=True
324+
self.ptr.potion_sick=True
325325

326326

327327
def behavior(self, attack=False, remote=False): #不同AI等级怪物的行为

src/playerAttr.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def __init__(self):
2323
self.LR=6 #光照范围
2424
self.blind=False
2525
self.frozen=False
26-
self.bleeding = False
26+
self.potion_sick = False
2727
self.kill_dict={2*i:0 for i in range(25)}
2828
self.__equips=({'Left':0, 'Right':0, 'Head':0, 'Armoos.path.join(":0, ")Leg':0, 'Necklace':0,
2929
'Ring':0, 'Feet':0, 'Wand':0, 'Book':0, 'Cape':0, 'Amulet':0, 'Dual':0, 'Arrow':0}) #考虑加一项Dual
@@ -539,7 +539,8 @@ def stat1(self): #中毒效果(可能导致死亡)
539539
return 0
540540
if self.__stat[1]<=-1:
541541
self.__stat[1]-=1
542-
if self.__stat[1]==-13:
542+
if self.__stat[1]== -7 - self.poisonR: # 表示了中毒的 __stat[1] 时间
543+
# 每当 self.__stat[1] 量表为 -9 - self.poisonR 时,发生一次中毒扣血
543544
self.__stat[1]=-1
544545
possi=[0.25*self.poisonR, 0.25*(4-self.poisonR)]
545546
judge=random.choices([0, 1], possi)[0]
@@ -582,16 +583,16 @@ def stat6(self): #冰冻效果(不会死)
582583
self.__stat[6] -= 1
583584
elif self.__stat[6] == 1:
584585
self.__stat[6] -= 1
585-
self.__speed += 10
586+
self.__speed += 15
586587
self.frozen = False
587588
return 0
588589

589590
def stat7(self): #流血效果:药物使用无效(不致死)
590-
if self.__stat[7] and self.__stat[7] > 1:
591+
if self.__stat[7] > 1:
591592
self.__stat[7] -= 1
592593
elif self.__stat[7] == 1:
593594
self.__stat[7] -= 1
594-
self.bleeding = False
595+
self.potion_sick = False
595596
return 0
596597

597598
def bloodDrain(self, x=0, y=0, tag=0): #从怪物处吸血,tag=1是治疗卷轴或法杖
@@ -699,7 +700,7 @@ def reset(self): #重置
699700
self.LR = 6 # 光照范围
700701
self.blind = False
701702
self.frozen = False
702-
self.bleeding = False
703+
self.potion_sick = False
703704
self.kill_dict={2*i:0 for i in range(25)}
704705
self.__equips = ({'Left': 0, 'Right': 0, 'Head': 0, 'Armor': 0, 'Leg': 0, 'Necklace': 0,
705706
'Ring': 0, 'Feet': 0, 'Wand': 0, 'Book': 0, 'Cape': 0, 'Amulet': 0, 'Dual': 0,

src/ply.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def trig_portal(self):
9393
self.dg.sur.setChar(self.posx-1, self.posy-1, -1)
9494
self.inf.prefabTell('tp')
9595
self.trap_reset_pos() #踩到传送陷阱是被在本层内传送了
96-
self.ms.reset_mist()
96+
# self.ms.reset_mist()
9797

9898
def trig_summon(self): #TBS: 踩到召唤怪物陷阱就会召唤怪物
9999
self.dg.sur.setChar(self.posx-1 , self.posy-1, -1)
@@ -228,7 +228,7 @@ def trap_reset_pos(self): #踩到陷阱后,玩家位置的自动重设
228228
judge1=self.dg.getChar(x-1, y-1)
229229
judge2=self.dg.sur.getChar(x-1, y-1)
230230
judge3=self.dg.po.getChar(x-1, y-1)
231-
while not judge1 in self. dgNoTp or judge2 in self.surNoTp or judge3:
231+
while not judge1 in self.dgNoTp or judge2 in self.surNoTp or judge3:
232232
x, y=random.randint(5, 58), random.randint(5, 38)
233233
judge1=self.dg.getChar(x-1, y-1)
234234
judge2=self.dg.sur.getChar(x-1, y-1)

0 commit comments

Comments
 (0)