Skip to content

Durian AoE Damage and Visual Falloff - #178

Merged
candour merged 2 commits into
mainfrom
durian-aoe-falloff-13351916444807328427
Jun 2, 2026
Merged

Durian AoE Damage and Visual Falloff#178
candour merged 2 commits into
mainfrom
durian-aoe-falloff-13351916444807328427

Conversation

@candour

@candour candour commented Jun 2, 2026

Copy link
Copy Markdown
Owner

The Durian stand now features a more realistic AoE effect. Damage at the center of the impact is 100% and scales down linearly to 25% at the edge of the explosion radius. Visually, the expanding circle for the Durian explosion now uses a radial gradient that mirrors this decay and its size accurately reflects the stall's upgraded AoE radius.


PR created automatically by Jules for task 13351916444807328427 started by @candour

Summary by CodeRabbit

  • New Features

    • Durian weapon now applies progressive AoE damage falloff based on distance from the impact center, encouraging strategic positioning.
  • Visual Improvements

    • Durian AoE effects render as expanding, fading radial-gradient ovals for clearer, more expressive area-of-effect feedback.

- Added `radius` and `sourceStallType` to `VisualEffect` data class.
- Implemented linear damage falloff (100% at center to 25% at edge) for Durian stall in `MainViewModel.kt`.
- Updated `GameBoard.kt` to render Durian AoE with a radial gradient and isometric scaling matching its actual radius.

Co-authored-by: candour <4670475+candour@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@coderabbitai

coderabbitai Bot commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: de81b641-766f-4b38-bac4-38ccf827d261

📥 Commits

Reviewing files that changed from the base of the PR and between 3e882cd and e5f6db8.

📒 Files selected for processing (1)
  • app/src/main/java/com/messark/hawker/ui/components/GameBoard.kt
🚧 Files skipped from review as they are similar to previous changes (1)
  • app/src/main/java/com/messark/hawker/ui/components/GameBoard.kt

📝 Walkthrough

Walkthrough

This PR adds AoE metadata to VisualEffect, records per-hit distances during projectile impacts, applies a Durian-specific distance-based AoE damage falloff, and renders Durian EXPANDING_CIRCLE effects with a radial-gradient oval.

Changes

Durian AoE Damage and Rendering

Layer / File(s) Summary
VisualEffect model with AoE metadata
app/src/main/java/com/messark/hawker/model/GameModels.kt
VisualEffect data class extended with radius: Float = 0f and sourceStallType: StallType? = null.
MainViewModel hit tracking and Durian AoE damage falloff
app/src/main/java/com/messark/hawker/MainViewModel.kt
Hit collection changed from projectiles-only to (Projectile, distanceFromImpact) pairs; direct hits record 0f, AoE hits record computed distToImpact. Damage calculation destructures (proj, dist) and applies Durian-specific falloff using dist / aoeRadius.
GameBoard Durian EXPANDING_CIRCLE radial gradient rendering
app/src/main/java/com/messark/hawker/ui/components/GameBoard.kt
Adds conditional rendering for EXPANDING_CIRCLE effects from DURIAN stalls, drawing an isometrically-squashed radial-gradient oval sized from radius and faded using existing progress-derived alpha; other effects retain the original drawCircle path.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

  • candour/towerpower#133: Modifies MainViewModel.handleProjectiles and hit collection/processing; related to the hit aggregation changes extended here.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Durian AoE Damage and Visual Falloff' directly and concisely captures the main changes: Durian-specific damage falloff calculation and corresponding visual falloff via radial gradient rendering.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch durian-aoe-falloff-13351916444807328427

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

github-actions Bot commented Jun 2, 2026

Copy link
Copy Markdown

Build Successful! 🚀

Download APK

Note: This link will be removed when the PR is closed.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: baa83728-ba77-4a74-9eb0-ab36751ed5d7

📥 Commits

Reviewing files that changed from the base of the PR and between 9d1bdbd and 3e882cd.

📒 Files selected for processing (3)
  • app/src/main/java/com/messark/hawker/MainViewModel.kt
  • app/src/main/java/com/messark/hawker/model/GameModels.kt
  • app/src/main/java/com/messark/hawker/ui/components/GameBoard.kt

Comment thread app/src/main/java/com/messark/hawker/ui/components/GameBoard.kt
@candour
candour enabled auto-merge (squash) June 2, 2026 14:20
@candour

candour commented Jun 2, 2026

Copy link
Copy Markdown
Owner Author

Lines 334-352 scale only the draw bounds, not the gradient space. That means the left/right edge reaches the intended 25% falloff, but the top/bottom edge does not, so the visual no longer mirrors the damage curve or the actual isometric radius. Use the board’s Y scale in the radius calculation and scale the shader/canvas itself, not just the oval bounds.

@google-labs-jules

Copy link
Copy Markdown
Contributor

Lines 334-352 scale only the draw bounds, not the gradient space. That means the left/right edge reaches the intended 25% falloff, but the top/bottom edge does not, so the visual no longer mirrors the damage curve or the actual isometric radius. Use the board’s Y scale in the radius calculation and scale the shader/canvas itself, not just the oval bounds.

Good catch! I've updated the rendering logic to scale the canvas vertically based on the isometric Y factor before drawing the circle. This ensures the RadialGradient itself is squashed into the correct oval shape, matching both the visual bounds and the damage falloff curve perfectly.

- Updated Durian AoE rendering to use a matrix-scaled `RadialGradient` that mirrors the isometric perspective.
- Ensured damage falloff matches the refined visual curve.
- Addressed PR feedback regarding visual alignment with the damage curve.

Co-authored-by: candour <4670475+candour@users.noreply.github.com>
@candour
candour merged commit 2dbea01 into main Jun 2, 2026
3 checks passed
@candour
candour deleted the durian-aoe-falloff-13351916444807328427 branch June 2, 2026 15:16
@github-actions

github-actions Bot commented Jun 2, 2026

Copy link
Copy Markdown

Build Successful! 🚀

Download APK

Note: This link will be removed when the PR is closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant