Skip to content
Snippets Groups Projects
Commit 22a3cc10 authored by phenixceleste's avatar phenixceleste
Browse files

.contains added

parent acdbd5cb
No related branches found
No related tags found
1 merge request!7Resolve "Implement attack use"
Pipeline #9713 passed with stage
in 1 minute and 28 seconds
......@@ -30,7 +30,7 @@ trait Pokemon( // TODO: must add later max_life...
(((2.0 * (this.level) / 5.0) * (capacity.power) * (this.attack)
/ (other.defense)) / 50.0 + 2.0)
* (scala.util.Random.between(0.85, 1.0)) * multiplier
* (if this.ptype.foldLeft(false)(_ || _ == capacity.ctype) then 1.5 else 1.0)
* (if this.ptype.contains(capacity.ctype) then 1.5 else 1.0)
other.decreaseLife(Math.round(damage.toFloat))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment