From f7d9a89db443c8449c5f64a1ecf92a9b3abb6fdf Mon Sep 17 00:00:00 2001 From: David Thompson Date: Fri, 17 Apr 2020 09:22:22 -0400 Subject: Day 7 morning progress. --- lisparuga/enemy.scm | 13 ++++++------- lisparuga/game.scm | 12 ++++++------ 2 files changed, 12 insertions(+), 13 deletions(-) (limited to 'lisparuga') 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 ) 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 - #:name 'clouds - #:rank 0 - #:texture clouds) + ;; (make + ;; #:name 'clouds + ;; #:rank 0 + ;; #:texture clouds) player player-bullets (make @@ -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) -- cgit v1.2.3