home *** CD-ROM | disk | FTP | other *** search
- (define (spell-event-cardboard session card)
- (let* ((player (current-player session))
- (character (current-character player))
- )
- (call-prompt "<p>I've become happy.</p>")
- )
- )
-
- (define (spell-event-exchange session card)
- (let* ((player (current-player session))
- (character (current-character player)))
- (call-caption "<p>Exchange cards</p>")
- (cond
- ((= 0 (character-spellcards-length character))
- (call-prompt "<p>But you don't have cards to exchange...</p>"))
- ((= 0 (length (other-players session)))
- (call-prompt "<p>But you don't have anyone to exchange with...</p>"))
- (#t
- (let* ((my-card #f)
- (target-player #f)
- (target-character #f)
- (target-card #f)
- (retry #t))
- (while
- retry
- (call-message "<p>Pick a card you want to trade</p>")
- (set! my-card
- (character-spellcards-get
- character
- (call-query-card character)))
- (call-message "<p>Pick the player you want to trade with</p>")
- (set! target-player
- (session-order-get session (call-query-another-player)))
- (set! target-character
- (player-characters-get target-player 0))
- (if (= 0 (character-spellcards-length target-character))
- (begin
- (call-prompt
- "<p>"
- (character-name-get target-character)
- " She doesn't have a special card......</p>"))
- (begin
- (call-message "<p>Pick a card you want to trade</p>")
- (set! target-card
- (character-spellcards-get
- target-character
- (call-query-card target-character)))
- (call-message "<p>Do you want to trade?</p>")
- (if (call-query-yesno)
- (begin
- (character-spellcards-add character target-card)
- (character-spellcards-add target-character my-card)
- (character-spellcards-remove target-character target-card)
- (character-spellcards-remove character my-card)
- (call-show-spell-card my-card)
- (call-prompt
- "<p>"
- (spell-name-get (call-pull-spell my-card))
- " is now in "
- (character-name-get target-character)
- "'s hands.</p>")
- (call-show-spell-card target-card)
- (call-prompt
- "<p>"
- (spell-name-get (call-pull-spell target-card))
- " card now it's in "
- (character-name-get character)
- "'s hands!</p>")
- (call-hide-spell-card)
- (set! retry #f)))
- ))
- )
- ))
- )
- )
- )
-
- (define (spell-event-copy session card)
- (let* ((player (current-player session))
- (character (current-character player)))
- (call-caption "<p>A copy of the card</p>")
- (cond
- ((= 0 (length (other-players session)))
- (call-prompt "<p>But there is no one you can copy with...</p>"))
- (#t
- (let* ((another (another-player session))
- (ac (player-characters-get another 0))
- (count #f))
- (set! count (character-spellcards-length ac))
-
- ;; æSé─öpèⁿ
- (while (< 0 (character-spellcards-length character))
- (call-remove-spell-card
- (character-spellcards-get character 0)))
-
- ;; âRâsü[âJü[âhê╚èOé╠âJü[âhé≡é╖é╫é─âRâsü[
- (do ((i 0 (+ 1 i)))
- ((<= count i) #f)
- (let* ((card (character-spellcards-get ac i)))
- (if (not (string=? "âRâsü["
- (spell-name-get (call-pull-spell card))))
- (character-spellcards-add
- character
- (call-copy-spell-card card)))
- )
- )
- (call-prompt "<p>"
- (character-name-get ac)
- " We've copied all the cards!</p>"))))
- )
- )
-
- (define (spell-event-move session card)
- (let* ((player (current-player session))
- (character (current-character player)))
- (cond
- ((= 0 (length (other-players session)))
- (call-prompt "<p>But you don't have anyone to trade with......</p>"))
- (#t
- (let* ((another (another-player session))
- (ac (player-characters-get another 0))
- (line #f))
- (call-caption "<p> Trading of the bingo line</p>")
- (call-prompt "<p>"
- (character-name-get ac)
- " Trade with her.</p>")
- (call-show-left-duelist character)
- (call-show-right-duelist ac)
- (call-exchange-bingo-line ac)
- ))
- )
- )
- )
-
- (define (spell-event-duel-aux winner loser)
- (let* ((movie #f))
- (call-prompt "<p>" (character-name-get winner) " You won!</p>")
- (set! movie (move-movie winner loser))
- (if movie
- (begin
- (call-show-movie-card (quotient movie 5)
- (remainder movie 5))
- (call-prompt "<p> You subtract her a movie card!</p>")
- (call-hide-movie-card)
- )
- (call-prompt "<p>But " (character-name-get loser)
- " doesn't have any movie cards......</p>")
- )
- (character-duelwon-apply winner (lambda (x) (+ x 1)))
- (character-duellost-apply loser (lambda (x) (+ x 1)))
- )
- )
-
- (define (spell-event-duel session card)
- (let* ((player (current-player session))
- (character (current-character player))
- (currency-unit (session-currencyunit-get session)))
- (cond
- ((= 0 (length (other-players session)))
- (call-prompt "<p>But there is no one to bet with...</p>"))
- (#t
- (let* ((another (another-player session))
- (ac (player-characters-get another 0))
- (prize (* (+ 1 (character-lap-get character)) 50000)))
- (call-show-left-duelist character)
- (call-prompt "<p>Your rival......? </p>")
- (call-show-right-duelist ac)
- (call-prompt "<p>"
- (character-name-get ac)
- " It's her!</p>")
- (let* ((winner (call-duel character ac))
- (movie #f))
- (call-caption "<p>Duel</p>")
- (case winner
- ((0)
- (call-prompt "<p>The duel ended draw.</p>")
- (character-dueldrawn-apply character (lambda (x) (+ x 1)))
- (character-dueldrawn-apply ac (lambda (x) (+ x 1))))
- ((1)
- (set! prize (* 2 prize))
- (call-prompt "<p>"
- (character-name-get character)
- " You Won! <br/>"
- (character-name-get ac)
- " has to give you "
- (number->string prize)
- currency-unit
- "!</p>")
- (character-money-apply character (lambda (x) (+ x prize)))
- (character-money-apply ac (lambda (x) (- x prize)))
- (call-show-income prize))
- ((2)
- (call-prompt "<p>"
- (character-name-get character)
- " You lost.<br/>"
- (character-name-get ac)
- " has to get "
- (number->string prize)
- currency-unit
- " from you!</p>")
- (character-money-apply character (lambda (x) (- x prize)))
- (character-money-apply ac (lambda (x) (+ x prize)))
- (call-show-income (- prize)))
- )
- )
- )
- )
- )
- )
- )
-
- (define (spell-event-plus1 session card)
- (let* ((player (current-player session))
- (character (current-character player)))
- (character-skipaction-set character #f)
- (character-walk-set character 1)
- )
- )
-
- (define (spell-event-plus2 session card)
- (let* ((player (current-player session))
- (character (current-character player)))
- (character-skipaction-set character #f)
- (character-walk-set character 2)
- )
- )
-
- (define (spell-event-plus3 session card)
- (let* ((player (current-player session))
- (character (current-character player)))
- (character-skipaction-set character #f)
- (character-walk-set character 3)
- )
- )
-
- (define (spell-event-plus4 session card)
- (let* ((player (current-player session))
- (character (current-character player)))
- (character-skipaction-set character #f)
- (character-walk-set character 4)
- )
- )
-
- (define (spell-event-plus5 session card)
- (let* ((player (current-player session))
- (character (current-character player)))
- (character-skipaction-set character #f)
- (character-walk-set character 5)
- )
- )
-
- (define (spell-event-plus6 session card)
- (let* ((player (current-player session))
- (character (current-character player)))
- (character-skipaction-set character #f)
- (character-walk-set character 6)
- )
- )
-
- (define (spell-event-double session card)
- (let* ((player (current-player session))
- (character (current-character player)))
- (character-skipaction-set character #f)
- (character-walk-set character (call-play-dice 2))
- )
- )
-
- (define (spell-event-triple session card)
- (let* ((player (current-player session))
- (character (current-character player)))
- (character-skipaction-set character #f)
- (character-walk-set character (call-play-dice 3))
- )
- )
-
- (define (spell-event-jump session card)
- (let* ((player (current-player session))
- (character (current-character player))
- (location (character-location-get character))
- (rank #f))
- (if (< 1 (node-links-length location))
- ;; ò¬è≥é┼é═âWâââôâvé┼é½é╚éó
- (call-prompt "<p>But you can't jump from here!</p>")
- ;; "jump"(system.vsc)
- (begin
- (set! rank (call-get-rank character #f))
- (call-prompt "<p>"
- (character-name-get character)
- " is now in position n. "
- (number->string (+ rank 1))
- " in the game, so<br/>she has "
- (number->string (+ rank 1))
- " Jump(s) allowed!</p>")
- (jump session (+ rank 1))
- (character-skipaction-set character #f)
- (character-walk-set character 0))
- )
- )
- )
-
- (define (spell-event-secret session spell-card)
- (let* ((player (current-player session))
- (character (current-character player))
- (card (call-generate-movie-card #f))
- (gold (car card))
- (silver (cdr card))
- )
- (call-show-movie-card gold silver)
- (call-prompt "<p>The secret card is <br/>"
- (call-get-movie-priced-text #f gold silver)
- "!</p>")
- (call-prompt "<p>But she used it, so it no longer exists. Sorry!</p>")
- (call-hide-movie-card)
- )
- )
-
- (define (spell-event-mystery session spell-card)
- (let* ((player (current-player session))
- (character (current-character player))
- (card (call-generate-movie-card #f))
- (gold (car card))
- (silver (cdr card))
- )
- (call-show-movie-card gold silver)
- (call-prompt "<p>The mistery card is <br/>"
- (call-get-movie-priced-text #f gold silver)
- "!</p>")
- (call-prompt "<p>But she used it, so it no longer exists. Sorry!</p>")
- (call-hide-movie-card)
- )
- )
-
- (define (spell-event-voice session card)
- (let* ((player (current-player session))
- (character (current-character player)))
- (character-walkbonus-apply character (lambda (x) (+ x 100)))
- (call-play-se =teleca= #f)
- (call-wait-a-moment 60)
- (call-play-voice (spell-soundpath-get (call-pull-spell card)))
- )
- )
-
- (define *spell-events* `(
- (spell-event-cardboard . ,spell-event-cardboard)
- (spell-event-exchange . ,spell-event-exchange)
- (spell-event-copy . ,spell-event-copy)
- (spell-event-move . ,spell-event-move)
- (spell-event-duel . ,spell-event-duel)
- (spell-event-plus1 . ,spell-event-plus1)
- (spell-event-plus2 . ,spell-event-plus2)
- (spell-event-plus3 . ,spell-event-plus3)
- (spell-event-plus4 . ,spell-event-plus4)
- (spell-event-plus5 . ,spell-event-plus5)
- (spell-event-plus6 . ,spell-event-plus6)
- (spell-event-double . ,spell-event-double)
- (spell-event-triple . ,spell-event-triple)
- (spell-event-jump . ,spell-event-jump)
- (spell-event-voice . ,spell-event-voice)
- (spell-event-secret . ,spell-event-secret)
- (spell-event-mystery . ,spell-event-mystery)
- )
- )
-
-