Age | Commit message (Collapse) | Author | Files | Lines |
|
They are now required via the main.lua.
Also made Harmony giving you the plague in order to allow testing.
|
|
This should allow to finally call functions to lua without having to care
about working around situations where a lua call causes a c++ call which
needs to call to lua again.
Tested against the source of tales repository data.
|
|
Before monsters loaded their script file on *each* spawn.
This is rather wrong since the script state keeps growing for each monster.
However all of this was unnessecary since the main.lua can simply require
the script file.
If you do not want to spam the main.lua (or any other file) with all the
requires: I guess we can add script binds to iterate over all monsters and
add some custom properties to the monsters.xml (See Mana-Mantis #356)
|
|
This introduces two callbacks:
- on_update_derived_attribute -> Called to recalculate other derived
attributes.
- on_recalculate_base_attribute -> Called to recalculate a base attribute
(only called for characters. However the
function passed as callback can be useful
for recalculating the derived attributes
as well)
Monsters no longer block recalculation of attributes except HP and Speed.
I saw no sense to keep this.
Fixed constant value in libmana-constants.lua
Dropped bool type of the recalculation functions. It would be difficult to
keep it while pushing all to the script engine and it was unused anyway.
All in all this adds a LOT more flexibillity to projects since they can now
adapt all attributes in the way they want.
|
|
Did this during trying to understand the code
|
|
Reviewed-by: bjorn.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This documentation used to be accurate, until Point was merged with the
Position class in commit 8ff3e6674c1d4fc05fc1ba87f42484689fca0879.
Also fixed a typo.
|
|
|
|
Also added checks for invalid item and zero amount
Reviewed-by: bjorn.
|
|
|
|
This replaces the rather hard to understand event dispatcher with a
probably even harder to understand templated library, but fortunately
we can rely on the available documentation.
Hopefully it will also help with the readability of our code and with
adding additional signals to other classes.
Added libsigc++ to README and Travis CI configuration.
Reviewed-by: Erik Schilling
|
|
Same thing, but shorter.
|
|
Use lua_pushliteral and lua_pushlstring instead of lua_pushstring, which
avoids Lua having to determine the length of the string.
|
|
Should still work against Lua 5.1 as well.
|
|
|
|
You can now actually use the already used node in the monsters.xml
Monsters can have different vulnerabillities against elements:
<vulnerabillity element="earth" factor="2.0" />
This will double damage of the element earth to this monster.
|
|
New binds:
- Damage:
- id
- skill
- base
- delta
- cth
- element
- type
- truestrike
- range
- Attack:
- priority
- cooldown
- warmup
- global_cooldown
- damage
- on_attack
- MonsterClass:
- attacks
- ItemClass:
- attacks
|
|
During the implementation bjorn and I agreed to limit the number of attacks that
can be used in the same tick to one. This makes a lot of stuff easier and the
client cannot display two frames at the same time
Things done:
- Implemented setting of attacks when equipping/unequipping items
- Single place where the xml attack node is parsed
- Finished attack logic
- Unified the attack handling of monsters and characters
- Added a global cooldown after attack use
(not only for next use of same attack)
- Removed the temponary attributes for the monster attack values
- Priorities for all attacks
- Rewrote the attack core:
- Attacks now have this attributes:
- warmup -> time a attack needs after starting it to actually deal the damage
- cooldown -> time a attack needs after dealing damage before another attack
can be used
- reuse -> time before the same attack can be used again
- If no attack is performed at the moment the following is done:
- make a list with all ready attacks
- check for attack that has the necessarily range and highest priority
- start this attack (inform client about it)
- when warmup is finished -> trigger damage
- when cooldown is finished -> allow to use other (or the same if reusetimer
allows) attacks
TODO:
- sync client with this to allow better timed animations
|
|
|
|
The on_death and on_remove callbacks where not being executed in the
context of any map. Now they execute in the context of the map of the
being.
Reviewed-by: Erik Schilling
|
|
Takes the time required to do initial database creation down from
16 to 0.2 seconds on the Raspberry Pi.
|
|
Gender is shared. There is no reason in duplicating code
*Breaks compatbility with old clients*
*Requires clientside patch*
Reviewed-by: Stefan Beller.
|
|
Reviewed-by: bjorn.
|
|
The patch that allowed to use map objects as warp targets broke this.
During run of map initalize mActive was still false. This broke creating
objects (npc, triggers) in atinit.
Reviewed-by: bjorn.
|
|
This patch allows map objects as warp targets.
For use:
- Create object in tiled with type="WARP_DEST"
- Set name to anything you want
- Create usual WARP object
- Leave out the DEST_{X,Y} part
- Add DEST_NAME property with the name of the first object
This requires the game server to parse all maps at startup.
Change is tested.
Reviewed-by: bjorn.
|
|
Reviewed-by: bjorn.
|
|
|
|
* AttributeModifiersEffect::remove was not calling updateMod with the
'value' parameter, causing it to have no effect at all for Stackable
modifiers.
* The cached value of the changed modifier effect was not being
recalculated when removing modifiers, because it started one layer too
high (there's an inconsistency here: AttributeModifiersEffect::add
updates this cached value while AttributeModifiersEffect::remove
doesn't).
Reviewed-by: Erik Schilling
|
|
Reviewed-by: Stefan Beller.
|
|
Reviewed-by: bjorn.
|
|
This was forgotten to do when dropping the money checks and introducing the
checkItem function.
Reviewed-by: bjorn.
|
|
Previously each map had its own scope. They got merged now but the atinit
function was forgotten to adapt.
Reviewed-by: bjorn.
|
|
We do not need to calculate derived attributes of the derived attributes
but the base of the derived attribute.
Reviewed-by: bjorn.
|
|
Reviewed-by: bjorn
|
|
Kept the accountserver_startup time for now, since it could be useful.
Reviewed-by: Stefan Beller
|
|
The objects of ItemEffectInfo class, which are hold in mDispells
are definitly in mEffects as well, because they are added in
in addEffect as the same pointer.
Reviewed-by: Erik Schilling
|
|
Reviewed-by: bjorn
acked-by: Ablu
|
|
Reviewed-by: Stefan Beller.
|
|
Change is tested.
Mantis: #492.
Reviewed-by: Stefan Beller.
|
|
Prevents clientside desyncs.
Reviewed-by: Stefan Beller.
|
|
Reviewed-by: Ablu.
|
|
Acked-by: bjorn
|
|
Reviewed-by: bjorn
|
|
Had a comma too much.
Reviewed-by: Stefan Beller
Reviewed-by: Erik Schilling
|