+ 1
A good Teamplayer
https://code.sololearn.com/cgCzMrRmnc13/?ref=app Do sombody know how the „Witch“ not just heal herself???
6 Respuestas
+ 6
if (player is Witch){
((Witch)player).Heal(player);
}
Since player is Witch and Witch heals player, Witch heals itself! You might need to add a step before healing, like:
if (player is Witch){
// random_p = (select random)
((Witch)player).Heal(random_p);
}
+ 7
Btw, I made something really similar to your code way back. It was a lot of fun!
https://code.sololearn.com/cgNuU15zVpos/?ref=app
+ 4
David the Kangoro Seeing your problem was already resolved it would be great if you can mark the answer that you find useful to encourage the community to help each other out. 😉
+ 1
Thank you very much, Hatsi Rei !!! 😋😋
+ 1
Your Code is very nice
+ 1
I think im inspired now...😂 Thanks again!