-
Notifications
You must be signed in to change notification settings - Fork 0
/
cultist_player.rb
53 lines (40 loc) · 1.19 KB
/
cultist_player.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# encoding: UTF-8
#
# To change this license header, choose License Headers in Project Properties.
# To change this template file, choose Tools | Templates
# and open the template in the editor.
#
# Hecho por Braulio Vargas López
# Todos los derechos reservados, usa esto bajo tu propia responsabilidad.
module NapakalakyGame
class CultistPlayer < Player
attr_accessor :myCultistCard, :totalCultistPlayer
@@totalCultistPlayer = 0
# => p es el player y c el card
def initialize(p, c)
super(p.name)
copia(p)
@myCultistCard = c
@@totalCultistPlayer += 1
end
def getCombatLevel
level = super
level += @myCultistCard.getSpecialValue
return level
end
def getOponentLevel(m)
return m.getSpecialValue
end
def shouldConvert
return false
end
def computeGoldCoinsValue(t)
monedas = 0
t.each do |tr|
monedas = monedas + tr.goldCoins
end
monedas *= 2
return monedas
end
end
end