Author Topic: [fixed] A problem regarding the attack-boost skill  (Read 2027 times)

Hagekura

  • Archmage
  • ******
  • Posts: 524
    • View Profile
    • Hageus_Iaponicus(@Hageus_Hagekura)さん | Twitter
[fixed] A problem regarding the attack-boost skill
« on: 21 November 2012, 01:47:42 »
When morph a unit within attack-boost range, the morphed unit will gain no boosts, furthermore, if move the unit out of the boost skill range, the unit will gain "minus" boosts.

For example, I made a priest unit to have +5 hp-regeneration boost for units within a range. and put a unit within the range.
Code: [Select]
[url=http://imageshack.us/photo/my-images/145/screen2rt.png/][img]https://imageshack.us/a/img145/425/screen2rt.th.png[/img][/url]The peasant unit gains +5 hp-regen. then next, morph the peasant.

Code: [Select]
[url=http://imageshack.us/photo/my-images/846/screen3gk.png/][img]https://imageshack.us/a/img846/975/screen3gk.th.png[/img][/url]The morphed unit doesn't gain hp-regen boosts that should have gain. then next, move the unit out of the boost-skill range.

Code: [Select]
[url=http://imageshack.us/photo/my-images/607/screen4h.png/][img]https://imageshack.us/a/img607/9467/screen4h.th.png[/img][/url]The unit gains "minus"5 hp-regen.

ps. for softcoder, thank you for sending me message about translation. I'm sorry I didn't notice your message till now. I will get to update the Japanese translation.
« Last Edit: 7 October 2016, 21:26:52 by filux »
Bushido to iu wa shinu koto to mitsuketari.

Japanese Faction Mod

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile
Re: A problem regarding the attack-boost skill
« Reply #1 on: 21 November 2012, 16:23:35 »
Please post the xml so we can evaluate the problem.

Hagekura

  • Archmage
  • ******
  • Posts: 524
    • View Profile
    • Hageus_Iaponicus(@Hageus_Hagekura)さん | Twitter
Re: A problem regarding the attack-boost skill
« Reply #2 on: 21 November 2012, 23:03:57 »
This is the code of the priest unit.
Code: [Select]
<?xml version="1.0" standalone="no"?>

<unit>

<parameters>
<size value="1"/>
<height value="2"/>
<max-hp value="700" regeneration="5"/>
<max-ep value="0"/>
<max-unit-count value="5"/>
<armor value="0"/>
<armor-type value="leather"/>
<sight value="8"/>
<time value="100"/>
<multi-selection value="true"/>
<cellmap value="false"/>
<levels/>
<fields>
<field value="land"/>
</fields>
<properties/>
<light enabled="false"/>
<unit-requirements/>
<upgrade-requirements/>
<resource-requirements>
<resource name="gold" amount="125"/>
<resource name="food" amount="1"/>
</resource-requirements>
<resources-stored/>
<image path="../../data/images/unit_medical_priest.bmp"/>
<image-cancel path="../../data/images/japanese_cancel.bmp"/>
<meeting-point value="false"/>
<selection-sounds enabled="true">
<sound path="sounds/hage_sessoni.wav"/>
<sound path="sounds/hage_iso.wav"/>
<sound path="sounds/namu101.wav"/>
<sound path="../worker/sounds/hage_hai01.wav"/>
</selection-sounds>
<command-sounds enabled="true">
<sound path="sounds/namu101.wav"/>
<sound path="sounds/nc1695401.wav"/>
<sound path="sounds/hage_nannarito.wav"/>
<sound path="sounds/hage_tadatini01.wav"/>
<sound path="sounds/hage_shouti201.wav"/>
<sound path="sounds/hage_inomchi01.wav"/>
<sound path="sounds/hage_namunennpi01.wav"/>
</command-sounds>

</parameters>

<skills>

<skill>
<type value="stop"/>
<name value="stop_skill"/>
<ep-cost value="0"/>
<speed value="1000"/>
<anim-speed value="35"/>
<animation path="../../data/models/medical_priest_stand.g3d"/>
<sound enabled="false"/>
<attack-boost>
<allow-multiple-boosts value="true" />
<radius value="6"/>
<target value="ally">
<unit-type name="worker"/>
<unit-type name="yumi_ashigaru"/>
<unit-type name="teppo_ashigaru"/>
<unit-type name="nagae_ashigaru"/>
<unit-type name="medical_priest"/>
<unit-type name="peasant"/>
<unit-type name="samurai"/>
<unit-type name="shinobi"/>
<unit-type name="standard_bearer"/>
<unit-type name="swordsman"/>
<unit-type name="tsubute"/>
<unit-type name="houroku_thrower"/>
<unit-type name="ikki_mob"/>
<unit-type name="wakiyari"/>
<unit-type name="warrior_monk"/>
</target>
<max-hp value="0" regeneration="5"/>
<max-ep value="0"/>
<sight value="0"/>
<attack-strenght value="0"/>
<attack-range value="0"/>
<armor value="0"/>
<move-speed value="0" />
<production-speed value="0"/>
<particles value="true">
<affected-particle-file path="heal_particles.xml"/>
</particles>
</attack-boost>
</skill>

<skill>
<type value="move"/>
<name value="move_skill"/>
<ep-cost value="0"/>
<speed value="210"/>
<anim-speed value="100"/>
<animation path="../../data/models/medical_priest_move.g3d"/>
<sound enabled="false"/>
</skill>

<skill>
<type value="attack"/>
<name value="attack_skill"/>
<ep-cost value="0"/>
<speed value="70"/>
<anim-speed value="70"/>
<animation path="../../data/models/medical_priest_attack.g3d"/>
<sound enabled="true" start-time="0.5">
<sound-file path="../shinobi/sounds/clothd1601.wav"/>
<sound-file path="../shinobi/sounds/throw012201.wav"/>
</sound>
<attack-strenght value="60"/>
<attack-var value="30"/>
<attack-range value="6"/>
<attack-type value="slashing"/>
<attack-start-time value="0.5"/>
<attack-fields>
<field value="land"/>
<field value="air"/>
</attack-fields>
<projectile value="true">
<particle value="true" path="particle_proj.xml"/>
<sound enabled="true">
<sound-file path="sounds/golem_hit1.wav"/>
</sound>
</projectile>
<splash value="false"/>
</skill>

<skill>
<type value="die"/>
<name value="die_skill"/>
<ep-cost value="0"/>
<speed value="90"/>
<anim-speed value="35"/>
<animation path="../../data/models/medical_priest_death.g3d"/>
<particles value="true" start-time="0" end-time="0.2">
<particle-file path="../castle/blood_particles.xml"/>
</particles>
<sound enabled="true" start-time="0">
<sound-file path="sounds/technician_die1.wav"/>
<sound-file path="sounds/technician_die2.wav"/>
<sound-file path="sounds/technician_die3.wav"/>
<sound-file path="sounds/technician_die4.wav"/>
</sound>
<fade value="false"/>
</skill>

</skills>

<commands>

<command>
<type value="stop"/>
<name value="stop"/>
<image path="../../data/images/japanese_halt.bmp"/>
<unit-requirements/>
<upgrade-requirements/>
<stop-skill value="stop_skill"/>
</command>

<command>
<type value="move"/>
<name value="move"/>
<image path="../../data/images/japanese_move.bmp"/>
<unit-requirements/>
<upgrade-requirements/>
<move-skill value="move_skill"/>
</command>

<command>
<type value="attack_stopped"/>
<name value="hold_position"/>
<image path="../../data/images/japanese_hold.bmp"/>
<unit-requirements/>
<upgrade-requirements />
<stop-skill value="stop_skill"/>
<attack-skill value="attack_skill"/>
</command>

</commands>
</unit>
Bushido to iu wa shinu koto to mitsuketari.

Japanese Faction Mod

Ishmaru

  • Behemoth
  • *******
  • Posts: 1,071
  • um wat??
    • View Profile
    • DelphaDesign
Re: A problem regarding the attack-boost skill
« Reply #3 on: 22 November 2012, 00:08:00 »
I can confirm that I have seen this happen in annex as well. You can see this happen when you morph scorpion tanks nearby a factory. 
Annex: Conquer the World Release 4 For Pc Mac + Linux
https://forum.megaglest.org/index.php?topic=9570.0
Annex is now on Facebook!
https://www.facebook.com/AnnexConquer

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile
Re: A problem regarding the attack-boost skill
« Reply #4 on: 22 November 2012, 01:53:43 »
Fixed in svn rev# 3940

The bug was due to the fact morphed units KEEP their id and the code only changed the unit type (thus preserving the original attack boosts). Since it kept the same is the morphed unit thought it already had the attack boosts applied but it did not have them applied properly.

tomreyn

  • Local Moderator
  • Airship
  • ********
  • Posts: 2,764
    • View Profile
    • MegaGlest - the free and open source cross platform 3D real-time strategy game
Re: A problem regarding the attack-boost skill
« Reply #5 on: 22 November 2012, 03:55:06 »
I'll tag this as [fixed] without testing, please report back if your tests show otherwise.
atibox: Ryzen 1800X (8 cores @3.6GHz), 32 GB RAM, MSI Radeon RX 580 Gaming X 8G, PCI subsystem ID [1462:3417], (Radeon RX 580 chipset, POLARIS10) @3440x1440; latest stable Ubuntu release, (open source) radeon (amdgpu) / mesa video driver
atibox (old): Core2Quad Q9400 (4 cores @2.66GHz), 8 GB RAM, XFX HD-467X-DDF2, PCI subsystem ID [1682:2931], (Radeon HD 4670, RV730 XT) @1680x1050; latest stable Ubuntu release, (open source) radeon / mesa video driver
notebook: HP envy13d020ng
internet access: VDSL2+

· · · How YOU can contribute to MG · Latest development snapshot · How to build yourself · Megapack techtree · Currently hosted MG games · · ·

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile
Re: [fixed] A problem regarding the attack-boost skill
« Reply #6 on: 22 November 2012, 17:56:39 »
Feel free to try the 3.7.1-dev binary:
Code: [Select]
[url=http://w32.nightly.megaglest.org/nightly/megaglest-binary-win32-i386-3.7.1-dev.7z]http://w32.nightly.megaglest.org/nightly/megaglest-binary-win32-i386-3.7.1-dev.7z[/url]
« Last Edit: 7 October 2016, 21:27:35 by filux »

Hagekura

  • Archmage
  • ******
  • Posts: 524
    • View Profile
    • Hageus_Iaponicus(@Hageus_Hagekura)さん | Twitter
Re: [fixed] A problem regarding the attack-boost skill
« Reply #7 on: 22 November 2012, 20:03:51 »
Feel free to try the 3.7.1-dev binary:
Code: [Select]
[url=http://w32.nightly.megaglest.org/nightly/megaglest-binary-win32-i386-3.7.1-dev.7z]http://w32.nightly.megaglest.org/nightly/megaglest-binary-win32-i386-3.7.1-dev.7z[/url]
I've tried it and Seems the problem has been solved now. thank you!
« Last Edit: 7 October 2016, 21:27:54 by filux »
Bushido to iu wa shinu koto to mitsuketari.

Japanese Faction Mod