patchBattle for Wesnoth - Patches: patch #1612, GSoC10 sample - Sapient's...

 
 
Show feedback again

patch #1612: GSoC10 sample - Sapient's proposed changes to allied healing

Submitted by:  Jody Northup <upthorn>
Submitted on:  Sun 11 Apr 2010 02:30:22 AM UTC  
 
Priority: 5 - NormalStatus: Ready For Test
Privacy: PublicAssigned to: Iurii Chernyi <crab>
Open/Closed: Open

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Mon 12 Apr 2010 04:14:16 AM UTC, comment #1:

I don't know why it didn't occur to me before, but I'm attaching the savegame I used for testing.

Testing instructions:
place "Test" in userdata\saves\.
load savegame "Test" from the main menu.
Watch as AI takes its turns.
End turn.

Expected results:
On Galdrad (Side 5)'s turn, Muniolinde will heal Bel and Hewen by 4 points and Hewen will heal Muniolinde by 6 points. Muniolinde will head north to a village.
For Galdrad (Side 5)'s units, the round elapses and the amount of healing received is reset (invisible).
On Chantal (Side 6)'s turn, Hewen will heal Bel by 2 points (the difference between what was already received and the total that Hewen is able to provide), and slow Hóth's poisoning (invisible). Bel will not heal Hewen because Bel can only provide 4 points of healing, and Hewen has already received that much.
On Player (Side 1)'s turn, Bel will recover 2 hitpoints from resting, and Tindrithriel will heal Muniolinde by 4 points (because Muniolinde's round changed since he last received healing). Hóth will not take damage from his poison, because Hewen slowed it.
[For testing purposes, end turn immediately]
Orcish turns (Sides 2-4) elapse.
On Galdrad (Side 5)'s turn, Muniolinde will heal 4 points from the village (the difference between the 8 points that a village can provide, and the 4 points that Tindrithriel provided).
Chantal (Side 6)'s turn elapses.
On Player (Side 1)'s turn, Hóth will take 8 points of damage from poison.

(file #8925)

Jody Northup <upthorn>
Project Member
Sun 11 Apr 2010 02:30:22 AM UTC, original submission:

This patch implements Sapient's proposed changes to allied healing, as detaled in http://www.wesnoth.org/forum/viewtopic.php?f=15&t=15880 and formerly listed on http://wiki.wesnoth.org/NotSoEasyCoding to the best of my understanding.

To summarize:
Healers may heal ally units on the healed unit's turn.
A healed unit may only receive as a total healing per round the amount that the most powerful single source could provide in one application of its healing ability.

And in the spirit of the changes proposed on the forum thread, allied healers can now slow poison on their own turn.

Note: I do not necessarily expect this patch to be accepted, but I am providing it so that 2010 Google Summer of Code mentors can review it as a sample of my coding.
If you are not a Summer of Code mentor, DO NOT remove this patch.

Jody Northup <upthorn>
Project Member

 

(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #8925:  Test added by upthorn (406kB - application/octet-stream - Modified save file from first scenario in HttT campaign, provided for testing.)
file #8924:  Upthorn_wesnoth_allied_healing_changes_v3.patch added by upthorn (9kB - application/octet-stream - Corrected a typo in actions.cpp which was preventing poisoned units from receiving slowing outside of their turn, in changelog clarified amount of healing a unit can recieve per round.)
file #8922:  Upthorn_wesnoth_allied_healing_changes_v2.patch added by upthorn (8kB - application/octet-stream - added notes in changelog and data/core/about.cfg)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by crab (Updated the item)
  • -unavailable- added by upthorn (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 12 Apr 2010 04:14:16 AM UTCupthornAttached File-=>Added Test, #8925
    Mon 12 Apr 2010 03:58:54 AM UTCupthornAttached File-=>Added Upthorn_wesnoth_allied_healing_changes_v3.patch, #8924
    Mon 12 Apr 2010 03:20:02 AM UTCupthornAttached File-=>Added Upthorn_wesnoth_allied_healing_changes_v2.patch, #8922
    Sun 11 Apr 2010 01:16:02 PM UTCcrabStatusNone=>Ready For Test
      Assigned toNone=>crab
    Sun 11 Apr 2010 02:30:22 AM UTCupthornAttached File-=>Added Upthorn_wesnoth_allied_healing_changes.patch, #8908
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup