报错Can't instantiate abstract class Ultraman with abstract methods sttack

通过非常仔细的排查,发现错误如下:

1、单词拼写错误是诱发这个报错的直接原因

 from abc import ABCMeta,abstractmethod
from random import randint,randrange class Fighter(object,metaclass=ABCMeta):
"""战斗者""" #通过__slots__魔法限定对象可以绑定的成员变量
__slots__ = ('_name','_hp') def __init__(self,name,hp):
"""
初始化方法
:param name: 名字
:param hp: 战斗值
"""
self._name = name
self._hp = hp @property
def name(self):
return self._name @property
def hp(self):
return self._hp @hp.setter
def hp(self,hp):
self._hp = hp if hp >= 0 else 0 @property
def alive(self):
return self._hp > 0 @abstractmethod
def sttack(self,other):
"""
攻击
:param other: 被攻击的对象
:return:
"""
pass class Ultraman(Fighter):
"""奥特曼"""
__slots__ = ('_name',"_hp","_mp") def __init__(self,name,hp,mp):
"""
初始化名字
:param name: 名字
:param hp: 生命值
:param mp: 魔术值
"""
super().__init__(name,hp)
self._mp = mp def attack(self,other):
other.hp -= randint(15,25) def huge_attack(self,other):
"""
穷极必杀技(打掉对方至少50点或3/4的血)
:param other: 被攻击对象
:return: 使用成功返回True否则返回False
""" if self._mp >= 50:
self._mp -= 50
injury = other.hp * 3//4
injury = injury if injury >= 50 else 50
other.hp -= injury
return True
else:
self.attack(other)
return False def magic_attack(self,others):
"""
魔法攻击
:param others: 被攻击的群体
:return: 使用魔法成功返回TRUE否则返回False """
if self._mp >= 20:
self._mp -= 20
for temp in others:
if temp.alive:
temp.hp -= randint(10,15)
return True
else:
return False def resume(self):
"""恢复魔法值"""
incr_point = randint(1,10)
self._mp += incr_point
return incr_point def __str__(self):
return '~~~%s奥特曼~~~\n'%self._name + \
'生命值:%d\n'%self._hp + \
'魔法值:%d\n'%self._mp class Monster(Fighter):
"""小怪兽""" __slots__ = ('_name','_hp') def attack(self,other):
other.hp -= randint(10,20) def __str__(self):
return '~~~%s小怪兽~~~\n' % self._name + \
'生命值:%d\n'%self._hp def is_any_alive(monsters):
"""判断有没有活着的小怪兽"""
for monster in monsters:
if monster.alive > 0:
return True
return False def select_alive_one(monsters):
"""选中一只活着的小怪兽"""
monsters_len = len(monsters)
while True:
index = randrange(monsters_len)
monster = monsters[index]
if monster.alive > 0:
return monster def display_info(ultraman,monsters):
"""显示奥特曼和小怪兽的信息"""
print(ultraman)
for monster in monsters:
print(monster,end = '') def main():
u = Ultraman('骆昊',1000,120)
m1 = Monster('狄仁杰',250)
m2 = Monster('白元芳',500)
m3 = Monster('张大头',750)
ms = [m1,m2,m3]
fight_round = 1
while u.alive and is_any_alive(ms):
print('=======第%02d回合======='%fight_round)
m = select_alive_one(ms) #选中一个小怪兽
skill = randint(1,10) #通过随机数选择使用哪种技能
if skill <= 6:#60%的概率使用普通攻击
print('%s使用普通攻击打了%s'%(u.name,m.nama))
u.attack(m)
print('%s的魔法值恢复了%d点'%(u.name,u.resume()))
elif skill <= 9:
if u.magic_attack(ms):
print('%s使用了魔法攻击.'%u.name)
else:
print('%s使用魔法失败.'%u.name)
else:
if u.huge_attack(m):
print('%s使用究极必杀技虐了%s'%(u.name,m.name))
else:
print('%s使用普通攻击必杀虐了%s'%(u.name,m.name))
print('%s的魔法值恢复了%d点.'%(u.name,u.resume())) if m.alive >0: #如果选中的小该收没有死就回寄奥特曼
print('%s回击了%s'%(m.name,u.name))
m.attack(u)
display_info(u,ms) #每个回合结束收显示奥特曼和小怪兽的信息
fight_round += 1
print('\n========战斗结束!========\n')
if u.alive >0:
print('%s奥特曼胜利!'%u.name) else:
print('小怪兽胜利!')
if __name__ == '__main__':
main()

2、还有一些缩进错误,导致运行时不符合预期效果。

修改后的代码如下:

 from abc import ABCMeta,abstractmethod
from random import randint,randrange class Fighter(object,metaclass=ABCMeta):
"""战斗者""" #通过__slots__魔法限定对象可以绑定的成员变量
__slots__ = ('_name','_hp') def __init__(self,name,hp):
"""
初始化方法
:param name: 名字
:param hp: 战斗值
"""
self._name = name
self._hp = hp @property
def name(self):
return self._name @property
def hp(self):
return self._hp @hp.setter
def hp(self,hp):
self._hp = hp if hp >= 0 else 0 @property
def alive(self):
return self._hp > 0 @abstractmethod
# def sttack(self,other):
def attack(self, other):
"""
攻击
:param other: 被攻击的对象
:return:
"""
pass class Ultraman(Fighter):
"""奥特曼"""
__slots__ = ('_name',"_hp","_mp") def __init__(self,name,hp,mp):
"""
初始化名字
:param name: 名字
:param hp: 生命值
:param mp: 魔术值
"""
super().__init__(name,hp)
self._mp = mp def attack(self,other):
other.hp -= randint(15,25) def huge_attack(self,other):
"""
穷极必杀技(打掉对方至少50点或3/4的血)
:param other: 被攻击对象
:return: 使用成功返回True否则返回False
""" if self._mp >= 50:
self._mp -= 50
injury = other.hp * 3//4
injury = injury if injury >= 50 else 50
other.hp -= injury
return True
else:
self.attack(other)
return False def magic_attack(self,others):
"""
魔法攻击
:param others: 被攻击的群体
:return: 使用魔法成功返回TRUE否则返回False """
if self._mp >= 20:
self._mp -= 20
for temp in others:
#之前是这样写的
# if temp.alive:
# temp.hp -= randint(10,15)
if temp.alive:
temp.hp -= randint(10,15)
return True
else:
return False def resume(self):
"""恢复魔法值"""
incr_point = randint(1,10)
self._mp += incr_point
return incr_point def __str__(self):
return '~~~%s奥特曼~~~\n'%self._name + \
'生命值:%d\n' % self._hp + \
'魔法值:%d\n' % self._mp class Monster(Fighter):
"""小怪兽""" __slots__ = ('_name','_hp') def attack(self,other):
other.hp -= randint(10,20) def __str__(self):
return '~~~%s小怪兽~~~\n' % self._name + \
'生命值:%d\n'%self._hp def is_any_alive(monsters):
"""判断有没有活着的小怪兽"""
for monster in monsters:
if monster.alive > 0:
return True
return False def select_alive_one(monsters):
"""选中一只活着的小怪兽"""
monsters_len = len(monsters)
while True:
index = randrange(monsters_len)
monster = monsters[index]
if monster.alive > 0:
return monster def display_info(ultraman,monsters):
"""显示奥特曼和小怪兽的信息"""
print(ultraman)
for monster in monsters:
print(monster,end = '') def main():
u = Ultraman('骆昊',1000,120)
m1 = Monster('狄仁杰',250)
m2 = Monster('白元芳',500)
m3 = Monster('张大头',750)
ms = [m1,m2,m3]
fight_round = 1
while u.alive and is_any_alive(ms):
print('=======第%02d回合======='%fight_round)
m = select_alive_one(ms) #选中一个小怪兽
skill = randint(1,10) #通过随机数选择使用哪种技能
if skill <= 6:#60%的概率使用普通攻击
print('%s使用普通攻击打了%s'%(u.name,m.name))
u.attack(m)
print('%s的魔法值恢复了%d点'%(u.name,u.resume()))
elif skill <= 9:
if u.magic_attack(ms):
print('%s使用了魔法攻击.' % u.name)
else:
print('%s使用魔法失败.'% u.name)
else:
if u.huge_attack(m):
print('%s使用究极必杀技虐了%s' % (u.name,m.name))
else:
print('%s使用普通攻击必杀虐了%s' % (u.name,m.name))
print('%s的魔法值恢复了%d点.'%(u.name,u.resume())) if m.alive >0: #如果选中的小该收没有死就回寄奥特曼
print('%s回击了%s'%(m.name,u.name))
m.attack(u)
display_info(u,ms) #每个回合结束收显示奥特曼和小怪兽的信息
fight_round += 1
print('\n========战斗结束!========\n')
if u.alive >0:
print('%s奥特曼胜利!'%u.name) else:
print('小怪兽胜利!')
if __name__ == '__main__':
main()

运行结果:

 =======第01回合=======
骆昊使用普通攻击打了狄仁杰
骆昊的魔法值恢复了10点
狄仁杰回击了骆昊
~~~骆昊奥特曼~~~
生命值:986
魔法值:130 ~~~狄仁杰小怪兽~~~
生命值:231
~~~白元芳小怪兽~~~
生命值:500
~~~张大头小怪兽~~~
生命值:750
=======第02回合=======
骆昊使用了魔法攻击.
张大头回击了骆昊
~~~骆昊奥特曼~~~
生命值:968
魔法值:110 ~~~狄仁杰小怪兽~~~
生命值:220
~~~白元芳小怪兽~~~
生命值:486
~~~张大头小怪兽~~~
生命值:740
=======第03回合=======
骆昊使用了魔法攻击.
张大头回击了骆昊
~~~骆昊奥特曼~~~
生命值:949
魔法值:90 ~~~狄仁杰小怪兽~~~
生命值:205
~~~白元芳小怪兽~~~
生命值:473
~~~张大头小怪兽~~~
生命值:729
=======第04回合=======
骆昊使用普通攻击打了白元芳
骆昊的魔法值恢复了7点
白元芳回击了骆昊
~~~骆昊奥特曼~~~
生命值:934
魔法值:97 ~~~狄仁杰小怪兽~~~
生命值:205
~~~白元芳小怪兽~~~
生命值:448
~~~张大头小怪兽~~~
生命值:729
=======第05回合=======
骆昊使用普通攻击打了白元芳
骆昊的魔法值恢复了6点
白元芳回击了骆昊
~~~骆昊奥特曼~~~
生命值:924
魔法值:103 ~~~狄仁杰小怪兽~~~
生命值:205
~~~白元芳小怪兽~~~
生命值:426
~~~张大头小怪兽~~~
生命值:729
=======第06回合=======
骆昊使用普通攻击打了白元芳
骆昊的魔法值恢复了4点
白元芳回击了骆昊
~~~骆昊奥特曼~~~
生命值:906
魔法值:107 ~~~狄仁杰小怪兽~~~
生命值:205
~~~白元芳小怪兽~~~
生命值:410
~~~张大头小怪兽~~~
生命值:729
=======第07回合=======
骆昊使用普通攻击打了白元芳
骆昊的魔法值恢复了10点
白元芳回击了骆昊
~~~骆昊奥特曼~~~
生命值:895
魔法值:117 ~~~狄仁杰小怪兽~~~
生命值:205
~~~白元芳小怪兽~~~
生命值:390
~~~张大头小怪兽~~~
生命值:729
=======第08回合=======
骆昊使用普通攻击打了狄仁杰
骆昊的魔法值恢复了3点
狄仁杰回击了骆昊
~~~骆昊奥特曼~~~
生命值:881
魔法值:120 ~~~狄仁杰小怪兽~~~
生命值:186
~~~白元芳小怪兽~~~
生命值:390
~~~张大头小怪兽~~~
生命值:729
=======第09回合=======
骆昊使用究极必杀技虐了狄仁杰
狄仁杰回击了骆昊
~~~骆昊奥特曼~~~
生命值:868
魔法值:70 ~~~狄仁杰小怪兽~~~
生命值:47
~~~白元芳小怪兽~~~
生命值:390
~~~张大头小怪兽~~~
生命值:729
=======第10回合=======
骆昊使用普通攻击打了狄仁杰
骆昊的魔法值恢复了4点
狄仁杰回击了骆昊
~~~骆昊奥特曼~~~
生命值:851
魔法值:74 ~~~狄仁杰小怪兽~~~
生命值:32
~~~白元芳小怪兽~~~
生命值:390
~~~张大头小怪兽~~~
生命值:729
=======第11回合=======
骆昊使用了魔法攻击.
张大头回击了骆昊
~~~骆昊奥特曼~~~
生命值:838
魔法值:54 ~~~狄仁杰小怪兽~~~
生命值:20
~~~白元芳小怪兽~~~
生命值:375
~~~张大头小怪兽~~~
生命值:716
=======第12回合=======
骆昊使用普通攻击打了张大头
骆昊的魔法值恢复了6点
张大头回击了骆昊
~~~骆昊奥特曼~~~
生命值:824
魔法值:60 ~~~狄仁杰小怪兽~~~
生命值:20
~~~白元芳小怪兽~~~
生命值:375
~~~张大头小怪兽~~~
生命值:701
=======第13回合=======
骆昊使用普通攻击打了狄仁杰
骆昊的魔法值恢复了4点
~~~骆昊奥特曼~~~
生命值:824
魔法值:64 ~~~狄仁杰小怪兽~~~
生命值:0
~~~白元芳小怪兽~~~
生命值:375
~~~张大头小怪兽~~~
生命值:701
=======第14回合=======
骆昊使用究极必杀技虐了白元芳
白元芳回击了骆昊
~~~骆昊奥特曼~~~
生命值:805
魔法值:14 ~~~狄仁杰小怪兽~~~
生命值:0
~~~白元芳小怪兽~~~
生命值:94
~~~张大头小怪兽~~~
生命值:701
=======第15回合=======
骆昊使用普通攻击打了张大头
骆昊的魔法值恢复了7点
张大头回击了骆昊
~~~骆昊奥特曼~~~
生命值:787
魔法值:21 ~~~狄仁杰小怪兽~~~
生命值:0
~~~白元芳小怪兽~~~
生命值:94
~~~张大头小怪兽~~~
生命值:678
=======第16回合=======
骆昊使用普通攻击必杀虐了白元芳
骆昊的魔法值恢复了4点.
白元芳回击了骆昊
~~~骆昊奥特曼~~~
生命值:777
魔法值:25 ~~~狄仁杰小怪兽~~~
生命值:0
~~~白元芳小怪兽~~~
生命值:78
~~~张大头小怪兽~~~
生命值:678
=======第17回合=======
骆昊使用普通攻击必杀虐了白元芳
骆昊的魔法值恢复了5点.
白元芳回击了骆昊
~~~骆昊奥特曼~~~
生命值:766
魔法值:30 ~~~狄仁杰小怪兽~~~
生命值:0
~~~白元芳小怪兽~~~
生命值:63
~~~张大头小怪兽~~~
生命值:678
=======第18回合=======
骆昊使用普通攻击打了张大头
骆昊的魔法值恢复了5点
张大头回击了骆昊
~~~骆昊奥特曼~~~
生命值:748
魔法值:35 ~~~狄仁杰小怪兽~~~
生命值:0
~~~白元芳小怪兽~~~
生命值:63
~~~张大头小怪兽~~~
生命值:656
=======第19回合=======
骆昊使用普通攻击打了张大头
骆昊的魔法值恢复了2点
张大头回击了骆昊
~~~骆昊奥特曼~~~
生命值:732
魔法值:37 ~~~狄仁杰小怪兽~~~
生命值:0
~~~白元芳小怪兽~~~
生命值:63
~~~张大头小怪兽~~~
生命值:631
=======第20回合=======
骆昊使用了魔法攻击.
白元芳回击了骆昊
~~~骆昊奥特曼~~~
生命值:718
魔法值:17 ~~~狄仁杰小怪兽~~~
生命值:0
~~~白元芳小怪兽~~~
生命值:53
~~~张大头小怪兽~~~
生命值:617
=======第21回合=======
骆昊使用普通攻击打了白元芳
骆昊的魔法值恢复了3点
白元芳回击了骆昊
~~~骆昊奥特曼~~~
生命值:702
魔法值:20 ~~~狄仁杰小怪兽~~~
生命值:0
~~~白元芳小怪兽~~~
生命值:35
~~~张大头小怪兽~~~
生命值:617
=======第22回合=======
骆昊使用普通攻击打了张大头
骆昊的魔法值恢复了8点
张大头回击了骆昊
~~~骆昊奥特曼~~~
生命值:683
魔法值:28 ~~~狄仁杰小怪兽~~~
生命值:0
~~~白元芳小怪兽~~~
生命值:35
~~~张大头小怪兽~~~
生命值:602
=======第23回合=======
骆昊使用普通攻击打了张大头
骆昊的魔法值恢复了6点
张大头回击了骆昊
~~~骆昊奥特曼~~~
生命值:671
魔法值:34 ~~~狄仁杰小怪兽~~~
生命值:0
~~~白元芳小怪兽~~~
生命值:35
~~~张大头小怪兽~~~
生命值:584
=======第24回合=======
骆昊使用了魔法攻击.
张大头回击了骆昊
~~~骆昊奥特曼~~~
生命值:652
魔法值:14 ~~~狄仁杰小怪兽~~~
生命值:0
~~~白元芳小怪兽~~~
生命值:20
~~~张大头小怪兽~~~
生命值:570
=======第25回合=======
骆昊使用魔法失败.
张大头回击了骆昊
~~~骆昊奥特曼~~~
生命值:635
魔法值:14 ~~~狄仁杰小怪兽~~~
生命值:0
~~~白元芳小怪兽~~~
生命值:20
~~~张大头小怪兽~~~
生命值:570
=======第26回合=======
骆昊使用普通攻击必杀虐了张大头
骆昊的魔法值恢复了1点.
张大头回击了骆昊
~~~骆昊奥特曼~~~
生命值:615
魔法值:15 ~~~狄仁杰小怪兽~~~
生命值:0
~~~白元芳小怪兽~~~
生命值:20
~~~张大头小怪兽~~~
生命值:555
=======第27回合=======
骆昊使用普通攻击打了张大头
骆昊的魔法值恢复了10点
张大头回击了骆昊
~~~骆昊奥特曼~~~
生命值:600
魔法值:25 ~~~狄仁杰小怪兽~~~
生命值:0
~~~白元芳小怪兽~~~
生命值:20
~~~张大头小怪兽~~~
生命值:540
=======第28回合=======
骆昊使用普通攻击打了张大头
骆昊的魔法值恢复了3点
张大头回击了骆昊
~~~骆昊奥特曼~~~
生命值:589
魔法值:28 ~~~狄仁杰小怪兽~~~
生命值:0
~~~白元芳小怪兽~~~
生命值:20
~~~张大头小怪兽~~~
生命值:521
=======第29回合=======
骆昊使用普通攻击打了白元芳
骆昊的魔法值恢复了3点
白元芳回击了骆昊
~~~骆昊奥特曼~~~
生命值:575
魔法值:31 ~~~狄仁杰小怪兽~~~
生命值:0
~~~白元芳小怪兽~~~
生命值:2
~~~张大头小怪兽~~~
生命值:521
=======第30回合=======
骆昊使用普通攻击打了张大头
骆昊的魔法值恢复了10点
张大头回击了骆昊
~~~骆昊奥特曼~~~
生命值:559
魔法值:41 ~~~狄仁杰小怪兽~~~
生命值:0
~~~白元芳小怪兽~~~
生命值:2
~~~张大头小怪兽~~~
生命值:506
=======第31回合=======
骆昊使用普通攻击打了白元芳
骆昊的魔法值恢复了6点
~~~骆昊奥特曼~~~
生命值:559
魔法值:47 ~~~狄仁杰小怪兽~~~
生命值:0
~~~白元芳小怪兽~~~
生命值:0
~~~张大头小怪兽~~~
生命值:506
=======第32回合=======
骆昊使用了魔法攻击.
张大头回击了骆昊
~~~骆昊奥特曼~~~
生命值:546
魔法值:27 ~~~狄仁杰小怪兽~~~
生命值:0
~~~白元芳小怪兽~~~
生命值:0
~~~张大头小怪兽~~~
生命值:494
=======第33回合=======
骆昊使用了魔法攻击.
张大头回击了骆昊
~~~骆昊奥特曼~~~
生命值:529
魔法值:7 ~~~狄仁杰小怪兽~~~
生命值:0
~~~白元芳小怪兽~~~
生命值:0
~~~张大头小怪兽~~~
生命值:482
=======第34回合=======
骆昊使用普通攻击打了张大头
骆昊的魔法值恢复了1点
张大头回击了骆昊
~~~骆昊奥特曼~~~
生命值:511
魔法值:8 ~~~狄仁杰小怪兽~~~
生命值:0
~~~白元芳小怪兽~~~
生命值:0
~~~张大头小怪兽~~~
生命值:463
=======第35回合=======
骆昊使用普通攻击打了张大头
骆昊的魔法值恢复了2点
张大头回击了骆昊
~~~骆昊奥特曼~~~
生命值:495
魔法值:10 ~~~狄仁杰小怪兽~~~
生命值:0
~~~白元芳小怪兽~~~
生命值:0
~~~张大头小怪兽~~~
生命值:442
=======第36回合=======
骆昊使用普通攻击打了张大头
骆昊的魔法值恢复了9点
张大头回击了骆昊
~~~骆昊奥特曼~~~
生命值:485
魔法值:19 ~~~狄仁杰小怪兽~~~
生命值:0
~~~白元芳小怪兽~~~
生命值:0
~~~张大头小怪兽~~~
生命值:417
=======第37回合=======
骆昊使用普通攻击打了张大头
骆昊的魔法值恢复了2点
张大头回击了骆昊
~~~骆昊奥特曼~~~
生命值:471
魔法值:21 ~~~狄仁杰小怪兽~~~
生命值:0
~~~白元芳小怪兽~~~
生命值:0
~~~张大头小怪兽~~~
生命值:396
=======第38回合=======
骆昊使用普通攻击打了张大头
骆昊的魔法值恢复了9点
张大头回击了骆昊
~~~骆昊奥特曼~~~
生命值:459
魔法值:30 ~~~狄仁杰小怪兽~~~
生命值:0
~~~白元芳小怪兽~~~
生命值:0
~~~张大头小怪兽~~~
生命值:381
=======第39回合=======
骆昊使用普通攻击打了张大头
骆昊的魔法值恢复了10点
张大头回击了骆昊
~~~骆昊奥特曼~~~
生命值:439
魔法值:40 ~~~狄仁杰小怪兽~~~
生命值:0
~~~白元芳小怪兽~~~
生命值:0
~~~张大头小怪兽~~~
生命值:365
=======第40回合=======
骆昊使用普通攻击打了张大头
骆昊的魔法值恢复了2点
张大头回击了骆昊
~~~骆昊奥特曼~~~
生命值:419
魔法值:42 ~~~狄仁杰小怪兽~~~
生命值:0
~~~白元芳小怪兽~~~
生命值:0
~~~张大头小怪兽~~~
生命值:349
=======第41回合=======
骆昊使用普通攻击打了张大头
骆昊的魔法值恢复了8点
张大头回击了骆昊
~~~骆昊奥特曼~~~
生命值:404
魔法值:50 ~~~狄仁杰小怪兽~~~
生命值:0
~~~白元芳小怪兽~~~
生命值:0
~~~张大头小怪兽~~~
生命值:324
=======第42回合=======
骆昊使用了魔法攻击.
张大头回击了骆昊
~~~骆昊奥特曼~~~
生命值:390
魔法值:30 ~~~狄仁杰小怪兽~~~
生命值:0
~~~白元芳小怪兽~~~
生命值:0
~~~张大头小怪兽~~~
生命值:313
=======第43回合=======
骆昊使用普通攻击打了张大头
骆昊的魔法值恢复了3点
张大头回击了骆昊
~~~骆昊奥特曼~~~
生命值:375
魔法值:33 ~~~狄仁杰小怪兽~~~
生命值:0
~~~白元芳小怪兽~~~
生命值:0
~~~张大头小怪兽~~~
生命值:290
=======第44回合=======
骆昊使用普通攻击打了张大头
骆昊的魔法值恢复了4点
张大头回击了骆昊
~~~骆昊奥特曼~~~
生命值:358
魔法值:37 ~~~狄仁杰小怪兽~~~
生命值:0
~~~白元芳小怪兽~~~
生命值:0
~~~张大头小怪兽~~~
生命值:273
=======第45回合=======
骆昊使用了魔法攻击.
张大头回击了骆昊
~~~骆昊奥特曼~~~
生命值:341
魔法值:17 ~~~狄仁杰小怪兽~~~
生命值:0
~~~白元芳小怪兽~~~
生命值:0
~~~张大头小怪兽~~~
生命值:263
=======第46回合=======
骆昊使用魔法失败.
张大头回击了骆昊
~~~骆昊奥特曼~~~
生命值:326
魔法值:17 ~~~狄仁杰小怪兽~~~
生命值:0
~~~白元芳小怪兽~~~
生命值:0
~~~张大头小怪兽~~~
生命值:263
=======第47回合=======
骆昊使用普通攻击打了张大头
骆昊的魔法值恢复了3点
张大头回击了骆昊
~~~骆昊奥特曼~~~
生命值:316
魔法值:20 ~~~狄仁杰小怪兽~~~
生命值:0
~~~白元芳小怪兽~~~
生命值:0
~~~张大头小怪兽~~~
生命值:244
=======第48回合=======
骆昊使用普通攻击打了张大头
骆昊的魔法值恢复了4点
张大头回击了骆昊
~~~骆昊奥特曼~~~
生命值:297
魔法值:24 ~~~狄仁杰小怪兽~~~
生命值:0
~~~白元芳小怪兽~~~
生命值:0
~~~张大头小怪兽~~~
生命值:229
=======第49回合=======
骆昊使用普通攻击打了张大头
骆昊的魔法值恢复了7点
张大头回击了骆昊
~~~骆昊奥特曼~~~
生命值:285
魔法值:31 ~~~狄仁杰小怪兽~~~
生命值:0
~~~白元芳小怪兽~~~
生命值:0
~~~张大头小怪兽~~~
生命值:209
=======第50回合=======
骆昊使用了魔法攻击.
张大头回击了骆昊
~~~骆昊奥特曼~~~
生命值:267
魔法值:11 ~~~狄仁杰小怪兽~~~
生命值:0
~~~白元芳小怪兽~~~
生命值:0
~~~张大头小怪兽~~~
生命值:195
=======第51回合=======
骆昊使用魔法失败.
张大头回击了骆昊
~~~骆昊奥特曼~~~
生命值:257
魔法值:11 ~~~狄仁杰小怪兽~~~
生命值:0
~~~白元芳小怪兽~~~
生命值:0
~~~张大头小怪兽~~~
生命值:195
=======第52回合=======
骆昊使用普通攻击必杀虐了张大头
骆昊的魔法值恢复了2点.
张大头回击了骆昊
~~~骆昊奥特曼~~~
生命值:242
魔法值:13 ~~~狄仁杰小怪兽~~~
生命值:0
~~~白元芳小怪兽~~~
生命值:0
~~~张大头小怪兽~~~
生命值:180
=======第53回合=======
骆昊使用魔法失败.
张大头回击了骆昊
~~~骆昊奥特曼~~~
生命值:224
魔法值:13 ~~~狄仁杰小怪兽~~~
生命值:0
~~~白元芳小怪兽~~~
生命值:0
~~~张大头小怪兽~~~
生命值:180
=======第54回合=======
骆昊使用普通攻击打了张大头
骆昊的魔法值恢复了1点
张大头回击了骆昊
~~~骆昊奥特曼~~~
生命值:214
魔法值:14 ~~~狄仁杰小怪兽~~~
生命值:0
~~~白元芳小怪兽~~~
生命值:0
~~~张大头小怪兽~~~
生命值:157
=======第55回合=======
骆昊使用普通攻击必杀虐了张大头
骆昊的魔法值恢复了3点.
张大头回击了骆昊
~~~骆昊奥特曼~~~
生命值:202
魔法值:17 ~~~狄仁杰小怪兽~~~
生命值:0
~~~白元芳小怪兽~~~
生命值:0
~~~张大头小怪兽~~~
生命值:133
=======第56回合=======
骆昊使用普通攻击打了张大头
骆昊的魔法值恢复了2点
张大头回击了骆昊
~~~骆昊奥特曼~~~
生命值:190
魔法值:19 ~~~狄仁杰小怪兽~~~
生命值:0
~~~白元芳小怪兽~~~
生命值:0
~~~张大头小怪兽~~~
生命值:113
=======第57回合=======
骆昊使用魔法失败.
张大头回击了骆昊
~~~骆昊奥特曼~~~
生命值:173
魔法值:19 ~~~狄仁杰小怪兽~~~
生命值:0
~~~白元芳小怪兽~~~
生命值:0
~~~张大头小怪兽~~~
生命值:113
=======第58回合=======
骆昊使用普通攻击打了张大头
骆昊的魔法值恢复了4点
张大头回击了骆昊
~~~骆昊奥特曼~~~
生命值:161
魔法值:23 ~~~狄仁杰小怪兽~~~
生命值:0
~~~白元芳小怪兽~~~
生命值:0
~~~张大头小怪兽~~~
生命值:96
=======第59回合=======
骆昊使用了魔法攻击.
张大头回击了骆昊
~~~骆昊奥特曼~~~
生命值:149
魔法值:3 ~~~狄仁杰小怪兽~~~
生命值:0
~~~白元芳小怪兽~~~
生命值:0
~~~张大头小怪兽~~~
生命值:83
=======第60回合=======
骆昊使用普通攻击打了张大头
骆昊的魔法值恢复了6点
张大头回击了骆昊
~~~骆昊奥特曼~~~
生命值:138
魔法值:9 ~~~狄仁杰小怪兽~~~
生命值:0
~~~白元芳小怪兽~~~
生命值:0
~~~张大头小怪兽~~~
生命值:58
=======第61回合=======
骆昊使用普通攻击打了张大头
骆昊的魔法值恢复了1点
张大头回击了骆昊
~~~骆昊奥特曼~~~
生命值:120
魔法值:10 ~~~狄仁杰小怪兽~~~
生命值:0
~~~白元芳小怪兽~~~
生命值:0
~~~张大头小怪兽~~~
生命值:37
=======第62回合=======
骆昊使用普通攻击打了张大头
骆昊的魔法值恢复了10点
张大头回击了骆昊
~~~骆昊奥特曼~~~
生命值:101
魔法值:20 ~~~狄仁杰小怪兽~~~
生命值:0
~~~白元芳小怪兽~~~
生命值:0
~~~张大头小怪兽~~~
生命值:14
=======第63回合=======
骆昊使用普通攻击必杀虐了张大头
骆昊的魔法值恢复了2点.
~~~骆昊奥特曼~~~
生命值:101
魔法值:22 ~~~狄仁杰小怪兽~~~
生命值:0
~~~白元芳小怪兽~~~
生命值:0
~~~张大头小怪兽~~~
生命值:0 ========战斗结束!======== 骆昊奥特曼胜利!

TypeError:Can't instantiate abstract class Ultraman with abstract methods sttack 报错的更多相关文章

  1. Module build failed: TypeError: this.getResolve is not a function at Object.loader sass报错!(亲测有效!~~)

    vue安装node-sass编译报错 在搭建vue脚手架 或者是在vue项目中,想使用sass的功能,需先安装如下 npm install node-sass --save-dev //安装node- ...

  2. Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient报错,问题排查

    背景 最近在整合pyspark与hive,新安装spark-2.3.3以客户端的方式访问hive数据,运行方式使用spark on yarn,但是在配置spark读取hive数据的时候,这里直接把hi ...

  3. “TypeError: list indices must be integers or slices, not str”有关报错解决方案

  4. Bootstap datetimepicker报错TypeError: intermediate value

    Bootstrap datetimepicker有多个版本,官方的链接中,只是datepicker,没有时间的选择,原版的datetimepicker也不再更新,不能用新版的jquery.现在http ...

  5. [java报错]Could not instantiate listener XXXXXX

    写在开头的话: 兜兜转转,辞去了深圳的工作,回到了武汉,从事的居然一度是我最不想学的语言-java,曾经以为自己并不会java,但是上手之后,发现语言都是相通的,自己一度排斥学习java真的是不能再傻 ...

  6. Jquery报错:Uncaught TypeError: ((m.event.special[e.origType] || (intermediate value)).handle || e.handler).apply is not a function

    页面中出现了Jquery报错:Uncaught TypeError: ((m.event.special[e.origType] || (intermediate value)).handle || ...

  7. Bootstap datetimepicker报错TypeError: intermediate value(转)

    原文转自:http://blog.chinaunix.net/uid-20332519-id-5733546.html Bootstrap datetimepicker有多个版本,官方的链接中,只是d ...

  8. [转载]UEditor报错TypeError: me.body is undefined

    本文转载来自:UEditor报错TypeError: me.body is undefined 今天在使用UEditor的setContent的时候报错,报错代码如下 TypeError: me.bo ...

  9. Vue的报错:Uncaught TypeError: Cannot assign to read only property 'exports' of object '#<Object>'

    Vue的报错:Uncaught TypeError: Cannot assign to read only property 'exports' of object '#<Object>' ...

随机推荐

  1. KafkaProducer Sender 线程详解(含详细的执行流程图)

    目录 1.Sender 线程详解 2.RecordAccumulator 核心方法详解 温馨提示:本文基于 Kafka 2.2.1 版本. 上文 <源码分析 Kafka 消息发送流程> 已 ...

  2. 14.python案例:爬取电影天堂中所有电视剧信息

    1.python案例:爬取电影天堂中所有电视剧信息 #!/usr/bin/env python3 # -*- coding: UTF-8 -*- '''======================== ...

  3. 彻底掌握CORS跨源资源共享

    本文来自于公众号链接: 彻底掌握CORS跨源资源共享 ) 本文接上篇公众号文章:彻底理解浏览器同源策略SOP 一.概述 在云时代,各种SAAS应用层出不穷,各种互联网API接口越来越丰富,H5技术在微 ...

  4. vim的常用指令(脑图)

    将正在编辑的文件另存新文件名   :w newfilename 在正在编辑的文件中,读取一个filename    :r filename 做了很多编辑工作,想还原成原来的文件内容   :e! 我在v ...

  5. react super中的props

    有的小伙伴每次写组件都会习惯性在constructor和super中写上props,那么这个是必要的吗?? 首先要明确很重要的一点就是: 可以不写constructor,一旦写了constructor ...

  6. 低副瓣阵列天线综合1 matlab HFSS

    车载雷达天线多采用微带贴片天线,贴片振子的形状多种多样,较常用的是矩形: 组阵时多采用先串馈再把串馈好的行或列单元采取并馈的方式组阵,无论是串馈或并馈,想要获得较低的副瓣效果,都需要采取电流幅度加权的 ...

  7. Java之IO流用法总结

    Java的IO流概述:1.I/O是Input/Output的缩写,I/O技术是非常实用的技术,用于处理设备之间的数据传输.如读/写文件,网络通讯等.2.Java程序中,对于数据的输入/输出操作以“流( ...

  8. python 多进程处理图像,充分利用CPU

    默认情况下,Python程序使用一个CPU以单个进程运行.不过如果你是在最近几年配置的电脑,通常都是四核处理器,也就是有8个CPU.这就意味着在你苦苦等待Python脚本完成数据处理工作时,你的电脑其 ...

  9. dp-最大递增子段和

      Nowadays, a kind of chess game called “Super Jumping! Jumping! Jumping!” is very popular in HDU. M ...

  10. 【JavaScript 基础知识】一篇关于 JavaScript 一些知识点的总结

    JavaScript 中基础数据类型  数据类型名称  数据类型说明 Undefined 只有一个值,即 undefined ,声明变量的初始值. Null 只有一个值,即 null ,表示空指针,  ...