Add XPs from a couple more mobs
parent
42d96754db
commit
6f1fe16c3c
36
ROADMAP
36
ROADMAP
|
@ -222,22 +222,34 @@ It's really fast. May be used on a website, to show the actual map.
|
|||
[mg_villages] ERROR: Did not find a suitable replacement for cottages:barrel_lying (suggested but inexistant: cottages:barrel_lying). Building: chateau_without_garden.
|
||||
[mg_villages] ERROR: Did not find a suitable replacement for cottages:barrel (suggested but inexistant: cottages:barrel). Building: chateau_without_garden.
|
||||
**** [feature_XpMobs] kill_xp/ Gain XPs by killing mobs
|
||||
CLOCK: [2019-01-02 mer. 01:23]
|
||||
CLOCK: [2019-01-02 mer. 01:23]--[2019-01-02 mer. 02:33] => 1:10
|
||||
*We're not gaining XP while killing monsters : for example slimes*
|
||||
Is there handled in the code. No we have to create it by ourselves
|
||||
- [ ] kill_xp/ mod
|
||||
- [ ] Inside mob mods
|
||||
when killing mob (on_punchmode)
|
||||
- peace one : 10XP + table
|
||||
- hostile one : XP table
|
||||
or killing another player : XP
|
||||
- [ ] Must add xpro as dependency for modified mods
|
||||
- [ ] For mobs, see the mods creating them
|
||||
searching in mobs/mods_redo : ther is a on_die custom function
|
||||
Maybe on do_punch to have the hiter name ?
|
||||
then in mobs_animal/chicken
|
||||
- peace one : 1XP per punch
|
||||
- hostile one : 2+ XP per punch
|
||||
or killing another player : XP
|
||||
- [X] There is a "singleplayer punches object 29: LuaEntitySAO at ..."
|
||||
log message ? can't find it
|
||||
- [X] For mobs, see the mods creating them
|
||||
searching in mobs/mods_redo : ther is a on_die custom function
|
||||
Maybe on do_punch to have the hiter name ?
|
||||
then in mobs_animal/chicken
|
||||
|
||||
- [ ] *How to add XP when punching a mob*
|
||||
- Must add xpro as dependency for modified mods
|
||||
- Add a on_punch handler
|
||||
do_punch = function (self, hitter, time_from_last_punch,
|
||||
tool_capabilities, direction)
|
||||
xpro.add_xp(hitter:get_player_name(), 1)
|
||||
return true
|
||||
end,
|
||||
- [ ] Add to all mobs_mc mobs
|
||||
- added to cow+mushroom
|
||||
- Added to creeper, but can't find it in creative mode
|
||||
- [ ] Another mob mod
|
||||
- [ ] For player, see onpunchplayer
|
||||
- [ ] There is a "singleplayer punches object 29: LuaEntitySAO at ..."
|
||||
log message ?
|
||||
- [ ] May remove chicken from mobs_animal mod (not used)
|
||||
**** TODO [fix_DoorProtection] Fix the door protection issue
|
||||
CLOCK: [2018-12-31 lun. 15:26]--[2018-12-31 lun. 15:40] => 0:14
|
||||
|
|
|
@ -67,6 +67,7 @@ mobs:register_mob("mobs_mc:chicken", {
|
|||
if mobs:protect(self, clicker) then return end
|
||||
if mobs:capture_mob(self, clicker, 0, 60, 5, false, nil) then return end
|
||||
end,
|
||||
|
||||
do_punch = function (self, hitter, time_from_last_punch,
|
||||
tool_capabilities, direction)
|
||||
xpro.add_xp(hitter:get_player_name(), 1)
|
||||
|
|
|
@ -45,6 +45,11 @@ local cow_def = {
|
|||
run_start = 0, run_end = 40,
|
||||
},
|
||||
follow = mobs_mc.follow.cow,
|
||||
do_punch = function (self, hitter, time_from_last_punch,
|
||||
tool_capabilities, direction)
|
||||
xpro.add_xp(hitter:get_player_name(), 1)
|
||||
return true
|
||||
end,
|
||||
on_rightclick = function(self, clicker)
|
||||
if mobs:feed_tame(self, clicker, 1, true, true) then return end
|
||||
if mobs:protect(self, clicker) then return end
|
||||
|
|
|
@ -42,6 +42,11 @@ mobs:register_mob("mobs_mc:creeper", {
|
|||
explosion_radius = 3,
|
||||
explosion_fire = false,
|
||||
|
||||
do_punch = function (self, hitter, time_from_last_punch,
|
||||
tool_capabilities, direction)
|
||||
xpro.add_xp(hitter:get_player_name(), 2)
|
||||
return true
|
||||
end,
|
||||
-- Force-ignite creeper with flint and steel and explode after 1.5 seconds.
|
||||
-- TODO: Make creeper flash after doing this as well.
|
||||
-- TODO: Test and debug this code.
|
||||
|
|
Loading…
Reference in New Issue