Tweak stats

This commit is contained in:
rubenwardy 2020-03-13 23:53:30 +00:00
parent eee6cfcbec
commit db5948c219
2 changed files with 11 additions and 13 deletions

View file

@ -2,12 +2,12 @@ function ctf_classes.show_gui(name, player)
player = player or minetest.get_player_by_name(name) player = player or minetest.get_player_by_name(name)
assert(player.get_player_name) assert(player.get_player_name)
if not ctf_classes.can_change(player) then if not ctf_classes.can_change(player) then
minetest.chat_send_player(name, "Move closer to your flag to change classes!") minetest.chat_send_player(name, "Move closer to the flag to change classes!")
return return
end end
local fs = { local fs = {
"size[9,3.2]" "size[9,3.4]"
} }
@ -45,7 +45,7 @@ function ctf_classes.show_gui(name, player)
for i, item in pairs(class.properties.items or {}) do for i, item in pairs(class.properties.items or {}) do
fs[#fs + 1] = "item_image[" fs[#fs + 1] = "item_image["
fs[#fs + 1] = tostring(i * 0.5 - 0.4) fs[#fs + 1] = tostring(i * 0.5 - 0.4)
fs[#fs + 1] = ",2.15;0.5,0.5;" fs[#fs + 1] = ",2.25;0.5,0.5;"
fs[#fs + 1] = minetest.formspec_escape(ItemStack(item):get_name()) fs[#fs + 1] = minetest.formspec_escape(ItemStack(item):get_name())
fs[#fs + 1] = "]" fs[#fs + 1] = "]"
@ -53,13 +53,13 @@ function ctf_classes.show_gui(name, player)
fs[#fs + 1] = "tooltip[" fs[#fs + 1] = "tooltip["
fs[#fs + 1] = tostring(i * 0.5 - 0.4) fs[#fs + 1] = tostring(i * 0.5 - 0.4)
fs[#fs + 1] = ",2.15;0.5,0.5;" fs[#fs + 1] = ",2.25;0.5,0.5;"
fs[#fs + 1] = minetest.formspec_escape(desc) fs[#fs + 1] = minetest.formspec_escape(desc)
fs[#fs + 1] = "]" fs[#fs + 1] = "]"
end end
fs[#fs + 1] = "button_exit[0.5,2.7;2,1;select_" fs[#fs + 1] = "button_exit[0.5,2.9;2,1;select_"
fs[#fs + 1] = class.name fs[#fs + 1] = class.name
fs[#fs + 1] = ";Select]" fs[#fs + 1] = ";Select]"
fs[#fs + 1] = "container_end[]" fs[#fs + 1] = "container_end[]"

View file

@ -21,21 +21,21 @@ ctf_classes.register("knight", {
max_hp = 30, max_hp = 30,
speed = 0.90, speed = 0.90,
items = {
"default:sword_steel",
},
allowed_guns = { allowed_guns = {
"shooter:pistol", "shooter:pistol",
"shooter:smg", "shooter:smg",
"shooter:shotgun", "shooter:shotgun",
}, },
items = {
"default:sword_steel",
},
}, },
}) })
ctf_classes.register("shooter", { ctf_classes.register("shooter", {
description = "Sharp Shooter", description = "Sharp Shooter",
pros = { "+10% ranged skill" }, pros = { "+50% range", "+20% faster shooting" },
cons = {}, cons = {},
color = "#c60", color = "#c60",
properties = { properties = {
@ -61,11 +61,9 @@ ctf_classes.register("shooter", {
ctf_classes.register("medic", { ctf_classes.register("medic", {
description = "Medic", description = "Medic",
pros = { "x2 regen for nearby friendlies" }, pros = { "x2 regen for nearby friendlies" },
cons = { "-50% Health Points" }, cons = {},
color = "#0af", color = "#0af",
properties = { properties = {
max_hp = 10,
items = { items = {
"ctf_bandages:bandage 20", "ctf_bandages:bandage 20",
}, },