@@ -9,7 +9,7 @@ DenotativeObject subclass: #CombatienteHumanoArthas
9
9
10
10
!classDefinition: 'CombatienteHumanoArthas class' category: 'AtaquesFantasticosPaso2'!
11
11
CombatienteHumanoArthas class
12
- instanceVariableNames: 'puntosDeFuerza puntosDeAgilidad estrategia dañoAAbsorber dañoAInfligir puntosDeVida enemigos fueraDeCombate'!
12
+ instanceVariableNames: 'puntosDeFuerza puntosDeAgilidad estrategia dañoAAbsorber dañoAInfligir puntosDeVida enemigos fueraDeCombate estaDistraido '!
13
13
14
14
!CombatienteHumanoArthas class methodsFor: 'combate' stamp: 'MP 9/18/2022 19:57:39'!
15
15
atacar
@@ -51,7 +51,7 @@ focalizarEnElMasSano
51
51
noEstaHerido
52
52
^puntosDeVida = (20*pv).! !
53
53
54
- !CombatienteHumanoArthas class methodsFor: 'combate' stamp: 'MP 9/17 /2022 15:24:39 '!
54
+ !CombatienteHumanoArthas class methodsFor: 'combate' stamp: 'MP 9/20 /2022 14:47:53 '!
55
55
prepararseParaElCombate
56
56
puntosDeVida := 20*pv.
57
57
dañoAInfligir := 2*pv.
@@ -60,17 +60,20 @@ prepararseParaElCombate
60
60
estrategia := [:posiblesEnemigosAAtacar | posiblesEnemigosAAtacar anyOne ].
61
61
puntosDeAgilidad := 1*pv.
62
62
puntosDeFuerza := 0*pv.
63
- fueraDeCombate := false.! !
63
+ fueraDeCombate := false.
64
+ estaDistraido := false.! !
64
65
65
66
!CombatienteHumanoArthas class methodsFor: 'combate' stamp: 'pal 8/23/2022 23:49:24'!
66
67
puntosDeVida
67
68
^puntosDeVida! !
68
69
69
- !CombatienteHumanoArthas class methodsFor: 'combate' stamp: 'MP 9/17 /2022 15:25:24 '!
70
+ !CombatienteHumanoArthas class methodsFor: 'combate' stamp: 'MP 9/20 /2022 14:49:45 '!
70
71
recibirDaño: unaCantidadDeDaño
71
- | dañoADescontar |
72
- dañoADescontar := (unaCantidadDeDaño - dañoAAbsorber - puntosDeAgilidad) max: 0*pv.
72
+ | dañoADescontar|
73
+ dañoADescontar := (unaCantidadDeDaño - dañoAAbsorber - puntosDeAgilidad) max: (0*pv).
74
+ estaDistraido ifTrue: [dañoADescontar = 0 ifFalse: [puntosDeVida := puntosDeVida - (2*pv)]].
73
75
puntosDeVida := puntosDeVida - dañoADescontar.
76
+ dañoADescontar = 0 ifTrue: [estaDistraido := true] ifFalse: [estaDistraido := false].
74
77
self chequearFueraDeCombate.
75
78
! !
76
79
@@ -96,20 +99,21 @@ usarHacha
96
99
dañoAInfligir := 10*pv.! !
97
100
98
101
99
- !CombatienteHumanoArthas class methodsFor: '--** private fileout/in **--' stamp: 'MP 9/18 /2022 21:48:30 '!
102
+ !CombatienteHumanoArthas class methodsFor: '--** private fileout/in **--' stamp: 'MP 9/20 /2022 14:54:06 '!
100
103
initializeCollaboratorsFromFile
101
104
"Auto generated method for loading purposes - Do not modify it"
102
105
103
106
puntosDeFuerza := (SimpleMeasure basicNew instVarAt: 1 put: 0; instVarAt: 2 put: (BaseUnit basicNew instVarAt: 1 put: 'puntosDeVida'; instVarAt: 2 put: 'puntosDeVidas'; instVarAt: 3 put: 'pv'; yourself); yourself).
104
107
puntosDeAgilidad := (SimpleMeasure basicNew instVarAt: 1 put: 1; instVarAt: 2 put: (BaseUnit basicNew instVarAt: 1 put: 'puntosDeVida'; instVarAt: 2 put: 'puntosDeVidas'; instVarAt: 3 put: 'pv'; yourself); yourself).
105
- estrategia := ((SerializableBlockClosure basicNew instVarAt: 1 put: (SerializableBlockClosure basicNew instVarAt: 1 put: CombatienteHumanoArthas; instVarAt: 2 put: '[ :argm4_1 |
106
- argm4_1 anyOne. ]'; instVarAt: 3 put: #(); yourself); instVarAt: 2 put: ' [ :argm0_1 |
107
- argm0_1 anyOne . ]'; instVarAt: 3 put: #(); yourself) asEvaluable).
108
- dañoAAbsorber := (SimpleMeasure basicNew instVarAt: 1 put: 0 ; instVarAt: 2 put: (BaseUnit basicNew instVarAt: 1 put: 'puntosDeVida'; instVarAt: 2 put: 'puntosDeVidas'; instVarAt: 3 put: 'pv'; yourself); yourself).
108
+ estrategia := ((SerializableBlockClosure basicNew instVarAt: 1 put: CombatienteHumanoArthas; instVarAt: 2 put: '[ :argm0_1 |
109
+ argm0_1 detectMin: [ :argm0_2 |
110
+ argm0_2 puntosDeVida ] . ]'; instVarAt: 3 put: #(); yourself) asEvaluable).
111
+ dañoAAbsorber := (SimpleMeasure basicNew instVarAt: 1 put: 6 ; instVarAt: 2 put: (BaseUnit basicNew instVarAt: 1 put: 'puntosDeVida'; instVarAt: 2 put: 'puntosDeVidas'; instVarAt: 3 put: 'pv'; yourself); yourself).
109
112
dañoAInfligir := (SimpleMeasure basicNew instVarAt: 1 put: 2; instVarAt: 2 put: (BaseUnit basicNew instVarAt: 1 put: 'puntosDeVida'; instVarAt: 2 put: 'puntosDeVidas'; instVarAt: 3 put: 'pv'; yourself); yourself).
110
- puntosDeVida := (SimpleMeasure basicNew instVarAt: 1 put: 2; instVarAt: 2 put: (BaseUnit basicNew instVarAt: 1 put: 'puntosDeVida'; instVarAt: 2 put: 'puntosDeVidas'; instVarAt: 3 put: 'pv'; yourself); yourself).
111
- enemigos := ((Array new: 1) at: 1 put: CombatienteOrcoOlgra; yourself).
112
- fueraDeCombate := false.! !
113
+ puntosDeVida := (SimpleMeasure basicNew instVarAt: 1 put: 20; instVarAt: 2 put: (BaseUnit basicNew instVarAt: 1 put: 'puntosDeVida'; instVarAt: 2 put: 'puntosDeVidas'; instVarAt: 3 put: 'pv'; yourself); yourself).
114
+ enemigos := ((Array new: 2) at: 1 put: CombatienteOrcoOlgra; at: 2 put: CombatienteOrcoMankrik; yourself).
115
+ fueraDeCombate := false.
116
+ estaDistraido := true.! !
113
117
114
118
115
119
!classDefinition: #CombatienteOrcoMankrik category: 'AtaquesFantasticosPaso2'!
@@ -213,18 +217,17 @@ usarHacha
213
217
dañoAInfligir := 10*pv.! !
214
218
215
219
216
- !CombatienteOrcoMankrik class methodsFor: '--** private fileout/in **--' stamp: 'MP 9/18 /2022 21:48:30 '!
220
+ !CombatienteOrcoMankrik class methodsFor: '--** private fileout/in **--' stamp: 'MP 9/20 /2022 14:54:06 '!
217
221
initializeCollaboratorsFromFile
218
222
"Auto generated method for loading purposes - Do not modify it"
219
223
220
224
fueraDeCombate := false.
221
- enemigos := #( ).
222
- puntosDeVida := (SimpleMeasure basicNew instVarAt: 1 put: 20 ; instVarAt: 2 put: (BaseUnit basicNew instVarAt: 1 put: 'puntosDeVida'; instVarAt: 2 put: 'puntosDeVidas'; instVarAt: 3 put: 'pv'; yourself); yourself).
225
+ enemigos := ((Array new: 1) at: 1 put: CombatienteHumanoArthas; yourself ).
226
+ puntosDeVida := (SimpleMeasure basicNew instVarAt: 1 put: 18 ; instVarAt: 2 put: (BaseUnit basicNew instVarAt: 1 put: 'puntosDeVida'; instVarAt: 2 put: 'puntosDeVidas'; instVarAt: 3 put: 'pv'; yourself); yourself).
223
227
dañoAInfligir := (SimpleMeasure basicNew instVarAt: 1 put: 2; instVarAt: 2 put: (BaseUnit basicNew instVarAt: 1 put: 'puntosDeVida'; instVarAt: 2 put: 'puntosDeVidas'; instVarAt: 3 put: 'pv'; yourself); yourself).
224
228
dañoAAbsorber := (SimpleMeasure basicNew instVarAt: 1 put: 0; instVarAt: 2 put: (BaseUnit basicNew instVarAt: 1 put: 'puntosDeVida'; instVarAt: 2 put: 'puntosDeVidas'; instVarAt: 3 put: 'pv'; yourself); yourself).
225
- estrategia := ((SerializableBlockClosure basicNew instVarAt: 1 put: (SerializableBlockClosure basicNew instVarAt: 1 put: CombatienteOrcoMankrik; instVarAt: 2 put: '[ :argm4_1 |
226
- argm4_1 anyOne. ]'; instVarAt: 3 put: #(); yourself); instVarAt: 2 put: '[ :argm0_1 |
227
- argm0_1 anyOne. ]'; instVarAt: 3 put: #(); yourself) asEvaluable).
229
+ estrategia := ((SerializableBlockClosure basicNew instVarAt: 1 put: CombatienteOrcoMankrik; instVarAt: 2 put: '[ :argm4_1 |
230
+ argm4_1 anyOne. ]'; instVarAt: 3 put: #(); yourself) asEvaluable).
228
231
puntosDeAgilidad := (SimpleMeasure basicNew instVarAt: 1 put: 0; instVarAt: 2 put: (BaseUnit basicNew instVarAt: 1 put: 'puntosDeVida'; instVarAt: 2 put: 'puntosDeVidas'; instVarAt: 3 put: 'pv'; yourself); yourself).
229
232
puntosDeFuerza := (SimpleMeasure basicNew instVarAt: 1 put: 2; instVarAt: 2 put: (BaseUnit basicNew instVarAt: 1 put: 'puntosDeVida'; instVarAt: 2 put: 'puntosDeVidas'; instVarAt: 3 put: 'pv'; yourself); yourself).
230
233
estaDistraido := false.! !
@@ -303,10 +306,10 @@ prepararseParaElCombate
303
306
puntosDeVida
304
307
^puntosDeVida! !
305
308
306
- !CombatienteOrcoOlgra class methodsFor: 'combate' stamp: 'MP 9/18 /2022 20:03:40 '!
309
+ !CombatienteOrcoOlgra class methodsFor: 'combate' stamp: 'MP 9/20 /2022 14:50:21 '!
307
310
recibirDaño: unaCantidadDeDaño
308
311
| dañoADescontar|
309
- dañoADescontar := (unaCantidadDeDaño - dañoAAbsorber - puntosDeAgilidad) max: 0*pv.
312
+ dañoADescontar := (unaCantidadDeDaño - dañoAAbsorber - puntosDeAgilidad) max: ( 0*pv) .
310
313
estaDistraido ifTrue: [dañoADescontar = 0 ifFalse: [puntosDeVida := puntosDeVida - (2*pv)]].
311
314
puntosDeVida := puntosDeVida - dañoADescontar.
312
315
dañoADescontar = 0 ifTrue: [estaDistraido := true] ifFalse: [estaDistraido := false].
@@ -335,13 +338,12 @@ usarHacha
335
338
dañoAInfligir := 10*pv.! !
336
339
337
340
338
- !CombatienteOrcoOlgra class methodsFor: '--** private fileout/in **--' stamp: 'MP 9/18 /2022 21:48:30 '!
341
+ !CombatienteOrcoOlgra class methodsFor: '--** private fileout/in **--' stamp: 'MP 9/20 /2022 14:54:06 '!
339
342
initializeCollaboratorsFromFile
340
343
"Auto generated method for loading purposes - Do not modify it"
341
344
342
- estrategia := ((SerializableBlockClosure basicNew instVarAt: 1 put: (SerializableBlockClosure basicNew instVarAt: 1 put: CombatienteOrcoOlgra; instVarAt: 2 put: '[ :argm4_1 |
343
- argm4_1 anyOne. ]'; instVarAt: 3 put: #(); yourself); instVarAt: 2 put: '[ :argm0_1 |
344
- argm0_1 anyOne. ]'; instVarAt: 3 put: #(); yourself) asEvaluable).
345
+ estrategia := ((SerializableBlockClosure basicNew instVarAt: 1 put: CombatienteOrcoOlgra; instVarAt: 2 put: '[ :argm4_1 |
346
+ argm4_1 anyOne. ]'; instVarAt: 3 put: #(); yourself) asEvaluable).
345
347
dañoAAbsorber := (SimpleMeasure basicNew instVarAt: 1 put: 0; instVarAt: 2 put: (BaseUnit basicNew instVarAt: 1 put: 'puntosDeVida'; instVarAt: 2 put: 'puntosDeVidas'; instVarAt: 3 put: 'pv'; yourself); yourself).
346
348
dañoAInfligir := (SimpleMeasure basicNew instVarAt: 1 put: 2; instVarAt: 2 put: (BaseUnit basicNew instVarAt: 1 put: 'puntosDeVida'; instVarAt: 2 put: 'puntosDeVidas'; instVarAt: 3 put: 'pv'; yourself); yourself).
347
349
puntosDeVida := (SimpleMeasure basicNew instVarAt: 1 put: 0; instVarAt: 2 put: (BaseUnit basicNew instVarAt: 1 put: 'puntosDeVida'; instVarAt: 2 put: 'puntosDeVidas'; instVarAt: 3 put: 'pv'; yourself); yourself).
@@ -895,12 +897,12 @@ noGanoNadie
895
897
^self determinarGanador = 'indeterminado'! !
896
898
897
899
898
- !OrquestadorDeCombates class methodsFor: '--** private fileout/in **--' stamp: 'MP 9/18 /2022 21:48:30 '!
900
+ !OrquestadorDeCombates class methodsFor: '--** private fileout/in **--' stamp: 'MP 9/20 /2022 14:54:06 '!
899
901
initializeCollaboratorsFromFile
900
902
"Auto generated method for loading purposes - Do not modify it"
901
903
902
- bando1 := ((Array new: 1 ) at: 1 put: CombatienteHumanoArthas ; yourself).
903
- bando2 := ((Array new: 1) at: 1 put: CombatienteOrcoOlgra ; yourself).
904
+ bando1 := ((Array new: 2 ) at: 1 put: CombatienteOrcoOlgra; at: 2 put: CombatienteOrcoMankrik ; yourself).
905
+ bando2 := ((Array new: 1) at: 1 put: CombatienteHumanoArthas ; yourself).
904
906
rondaActual := 10.! !
905
907
906
908
0 commit comments