DudeFighter oddity

5 views
Skip to first unread message

Quinn Jones

unread,
Apr 25, 2014, 1:56:34 PM4/25/14
to Tim Menzies, cs...@googlegroups.com
I'm kind of wondering if this usage of lisp in DudeFighter was intentional, in the definition for the GhostAttack Node you use a second if to test the case of not having a dagger, when you could put it in as the alternative to the selection statement.  The reason this is an Issue is that the if in eval expects to unpack three values, so do we need too adjust the definition of If or can we safely move the "say fell the force of my slingshot" as the third part of the if statement?

GhostAttack
Hit the ghost
(if (have ('(dagger))) (say "Deal with this dagger, ghost!"))(if (not (have ('(dagger)))) (say "Feel the force of my slingshot!"))
> GhostAttack Your attack did not harm the ghost.
> LootGho You have defeated the the ghost. Now its time to take his stuff! :if (and (have('(dagger))) (fight "Ghost" "dagger"))
> LootGho You have defeated the the ghost. Now its time to take his stuff! :if (and (not(have('(dagger)))) (fight "Ghost" "slingshot"))

--Quinn Jones

Domenick Poster

unread,
Apr 25, 2014, 2:10:36 PM4/25/14
to cs...@googlegroups.com

I modified if to handle cases where no alt is provided . I think that was easier then altering stage text.

--
You received this message because you are subscribed to the Google Groups "cs310" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cs310+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages