Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Barry
/
discordbot
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
03403a56
authored
2016-02-27 18:32:41 +0000
by
Barry
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Added bug fix for experience when secondary defeats primary.
1 parent
226fb773
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
5 deletions
db.sqlite3
pankration.py
db.sqlite3
View file @
03403a5
No preview for this file type
pankration.py
View file @
03403a5
...
...
@@ -237,7 +237,7 @@ Monsters = {
'family'
:
'acrolith'
,
'zone'
:
[
'abyssea - uleguerand'
],
'hp'
:
20
,
'weapon_base_damage'
:
1
4
'weapon_base_damage'
:
1
8
},
'Floating Eye'
:
{
'family'
:
'ahriman'
,
...
...
@@ -648,9 +648,9 @@ class Monster:
pDif_rand
=
float
(
random
.
randint
(
int
(
pDif_min
*
100000
),
int
(
pDif_max
*
100000
)))
/
100000.0
fstr
=
((
self
.
get_strength
()
-
enemy_vit
)
+
4
)
/
4
print
(
"Str: {} Vit: {} fstr: {}"
.
format
(
self
.
get_strength
(),
enemy_vit
,
fstr
))
log
(
"Str: {} Vit: {} fstr: {}"
.
format
(
self
.
get_strength
(),
enemy_vit
,
fstr
))
bd
=
bd
+
fstr
final_damage
=
(
bd
*
(
pDif_rand
*
cRatio
))
final_damage
=
int
((
bd
*
(
pDif_rand
*
cRatio
)
))
return
final_damage
def
attack
(
self
,
monster
):
...
...
@@ -723,7 +723,9 @@ class Arena:
self
.
battle_type
=
battle_type
def
heal_monsters
(
self
):
pass
self
.
monster1
.
hp
=
self
.
monster1
.
get_hp
()
self
.
monster2
.
hp
=
self
.
monster2
.
get_hp
()
def
start
(
self
):
self
.
heal_monsters
()
...
...
@@ -761,7 +763,13 @@ class Arena:
primary
.
apply_damage
(
result2
[
0
])
actions
.
append
(
AttackAction
(
secondary
,
primary
,
result2
[
0
],
result2
[
1
]))
if
primary
.
hp
<=
0
:
xp
=
200
+
(
20
*
(
primary
.
level
-
secondary
.
level
))
level_difference
=
primary
.
level
-
secondary
.
level
if
level_difference
in
exp_table
:
xp
=
exp_table
[
level_difference
]
elif
level_difference
>
15
:
xp
=
exp_table
[
15
]
else
:
xp
=
0
actions
.
append
(
DefeatAction
(
secondary
,
primary
,
'was defeated'
,
xp
))
return
actions
else
:
...
...
Please
register
or
sign in
to post a comment