Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Manish Kumar
webpoke
Commits
db7fa39d
Commit
db7fa39d
authored
Jun 22, 2020
by
Manish Kumar
Browse files
round dmg and remove duplicates in friends
parent
a8895d51
Changes
2
Hide whitespace changes
Inline
Side-by-side
frontend/src/app/battle/battle.component.ts
View file @
db7fa39d
...
...
@@ -2,7 +2,6 @@ import { Component, OnInit } from '@angular/core';
import
{
HttpClient
}
from
'
@angular/common/http
'
;
import
{
ActivatedRoute
}
from
'
@angular/router
'
;
import
{
ChatService
}
from
'
../chat.service
'
;
import
{
Pokemon
}
from
"
./pokemon.js
"
;
@
Component
({
selector
:
'
app-battle
'
,
templateUrl
:
'
./battle.component.html
'
,
...
...
@@ -196,7 +195,7 @@ export class BattleComponent implements OnInit {
calculeDmg
(
eff
,
power
){
console
.
log
(
eff
,
power
);
console
.
log
(
this
.
enemyDef
+
"
"
+
this
.
atk
);
let
dmg
=
((((
0.4
*
this
.
level
+
2
)
*
this
.
atk
*
power
)
/
(
50
*
this
.
enemyDef
))
+
2
)
*
(
eff
/
100
)
*
(
Math
.
random
()
*
(
1
-
0.85
)
+
0.85
)
let
dmg
=
Math
.
round
(
((((
0.4
*
this
.
level
+
2
)
*
this
.
atk
*
power
)
/
(
50
*
this
.
enemyDef
))
+
2
)
*
(
eff
/
100
)
*
(
Math
.
random
()
*
(
1
-
0.85
)
+
0.85
)
);
this
.
applyDamageOpponent
(
dmg
);
console
.
log
(
dmg
+
"
"
+
this
.
enemyCurHealth
);
return
dmg
;
...
...
frontend/src/app/friends-menu/friends-menu.component.ts
View file @
db7fa39d
...
...
@@ -136,7 +136,6 @@ export class FriendsMenuComponent implements OnInit {
this
.
pseudo
=
res
.
body
;
this
.
uid
=
res
.
uid
;
this
.
liste
();
this
.
ordre
();
});
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment