diff options
author | David Thompson <dthompson@vistahigherlearning.com> | 2020-04-17 09:22:22 -0400 |
---|---|---|
committer | David Thompson <dthompson@vistahigherlearning.com> | 2020-04-17 09:22:22 -0400 |
commit | f7d9a89db443c8449c5f64a1ecf92a9b3abb6fdf (patch) | |
tree | 6afc2ad795f67637b44d603adef04e7825ff908d /lisparuga | |
parent | 5b461c68e3194aef85bd175d51a30f205adb327f (diff) |
Day 7 morning progress.
Diffstat (limited to 'lisparuga')
-rw-r--r-- | lisparuga/enemy.scm | 13 | ||||
-rw-r--r-- | lisparuga/game.scm | 12 |
2 files changed, 12 insertions, 13 deletions
diff --git a/lisparuga/enemy.scm b/lisparuga/enemy.scm index 9213890..dd298a6 100644 --- a/lisparuga/enemy.scm +++ b/lisparuga/enemy.scm @@ -98,13 +98,12 @@ (loop (+ i 1))))))) (define-method (on-collision (enemy <enemy>) bullet bullet-polarity hitbox) - ;; TODO: Distinguish between normal play bullets and homing shots - ;; that do more damage. - ;; - ;; Same polarity = 1 point of damage - ;; Opposite polarity = 2 points of damage - (let ((same-polarity? (eq? bullet-polarity (polarity enemy)))) - (damage enemy (if same-polarity? 1 2)) + ;; Same polarity = 1x damage + ;; Opposite polarity = 2x damage + (let* ((same-polarity? (eq? bullet-polarity (polarity enemy))) + (base-damage (if (eq? bullet ikaruga-missile) 10 1)) + (multiplier (if same-polarity? 1 2))) + (damage enemy (* base-damage multiplier)) (when (and same-polarity? (dead? enemy)) (set! (fire-parting-shots? enemy) #t))) #t) diff --git a/lisparuga/game.scm b/lisparuga/game.scm index bad080a..19e56ad 100644 --- a/lisparuga/game.scm +++ b/lisparuga/game.scm @@ -54,7 +54,7 @@ game-over? complete?)) -(define-asset clouds (load-image (scope-asset "images/clouds.png"))) +;;(define-asset clouds (load-image (scope-asset "images/clouds.png"))) (define-asset player-bullet-atlas (load-tile-atlas (scope-asset "images/player-bullets.png") 16 16)) (define-asset enemy-bullet-atlas @@ -115,10 +115,10 @@ #:rank 999))) (set! (rank player) 1) (attach-to game - (make <sprite> - #:name 'clouds - #:rank 0 - #:texture clouds) + ;; (make <sprite> + ;; #:name 'clouds + ;; #:rank 0 + ;; #:texture clouds) player player-bullets (make <node-2d> @@ -240,7 +240,7 @@ (set! (stage-script game) (run-script game (do-intro game) - ;;(do-tutorial game) + (do-tutorial game) (do-phase-1 game) (do-phase-2 game) (toratsugumi-sweep game '((() (white white white) 45) |