[wesnoth-commits] [wesnoth/wesnoth] ce4fb8: Filter weapon in [filter student/opponent/etc] rew...

newfrenchy83 noreply at github.com
Sat Jan 4 23:27:57 UTC 2020


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: ce4fb821737157761df0bab4d13e770a0efb23ec
      https://github.com/wesnoth/wesnoth/commit/ce4fb821737157761df0bab4d13e770a0efb23ec
  Author: newfrenchy83 <31768074+newfrenchy83 at users.noreply.github.com>
  Date:   2020-01-05 (Sun, 05 Jan 2020)

  Changed paths:
    M changelog.md
    M data/campaigns/Heir_To_The_Throne/utils/abilities.cfg
    M data/scenario-test.cfg
    M data/schema/units/abilities.cfg
    A data/test/scenarios/swarm_disables_upgrades_with_abilities.cfg
    M src/actions/attack.cpp
    M src/actions/attack.hpp
    M src/units/abilities.cpp
    M src/units/attack_type.hpp
    M src/units/unit.cpp
    M src/units/unit.hpp
    M wml_test_schedule

  Log Message:
  -----------
  Filter weapon in [filter student/opponent/etc] rework  (pr #4678)

All weapon specials can now be used in [abilities] to effect all weapons of the unit that pass the filter given in [filter_student][filter_weapon].

Explanation: filter_student filters on the unit that is  under the effect of the ability (which is usually the unit itself, but not always if [affect_adjacent] is used).  [filter_student][filter_weapon] filters on the active weapon of that unit (the student) in a specific combat.

[filter_weapon] is now supported in all filter_opponent, filter_student, filter_attacker, filter_defender

Note that constructs like [filter_student][or][filter_weapon] are not suported, [filter_weapon] must be a direct subtag of the four just mentioned tags.
 
[filter_second_weapon] is no longer used for abilities that come from weapon specials.

implements #4629 , #4475 , #4389

Co-authored-by: gfgtdf <daniel.gfgtdf at gmail.com>





More information about the Commits mailing list