Reformat
Reformat
This commit is contained in:
parent
371fbcb04d
commit
7ee5899e31
9 changed files with 111 additions and 108 deletions
|
@ -26,23 +26,23 @@ namespace character {
|
|||
[&](const equipments &arg) {
|
||||
++sheet.nb_equipments;
|
||||
change_carac_equipment(arg,
|
||||
sheet,
|
||||
local_habilete,
|
||||
local_adresse,
|
||||
local_endurance,
|
||||
local_chance,
|
||||
plus,
|
||||
minus);
|
||||
sheet,
|
||||
local_habilete,
|
||||
local_adresse,
|
||||
local_endurance,
|
||||
local_chance,
|
||||
plus,
|
||||
minus);
|
||||
},
|
||||
[&](const tools &arg) {
|
||||
++sheet.nb_tools;
|
||||
change_carac_tools(arg,
|
||||
sheet,
|
||||
local_habilete,
|
||||
local_adresse,
|
||||
local_endurance,
|
||||
local_chance,
|
||||
plus);
|
||||
sheet,
|
||||
local_habilete,
|
||||
local_adresse,
|
||||
local_endurance,
|
||||
local_chance,
|
||||
plus);
|
||||
},
|
||||
}, object);
|
||||
}
|
||||
|
@ -66,36 +66,35 @@ namespace character {
|
|||
[&](const equipments &arg) {
|
||||
--sheet.nb_equipments;
|
||||
change_carac_equipment(arg,
|
||||
sheet,
|
||||
local_habilete,
|
||||
local_adresse,
|
||||
local_endurance,
|
||||
local_chance,
|
||||
minus,
|
||||
plus);
|
||||
sheet,
|
||||
local_habilete,
|
||||
local_adresse,
|
||||
local_endurance,
|
||||
local_chance,
|
||||
minus,
|
||||
plus);
|
||||
},
|
||||
[&](const tools &arg) {
|
||||
--sheet.nb_tools;
|
||||
change_carac_tools(arg,
|
||||
sheet,
|
||||
local_habilete,
|
||||
local_adresse,
|
||||
local_endurance,
|
||||
local_chance,
|
||||
minus);
|
||||
sheet,
|
||||
local_habilete,
|
||||
local_adresse,
|
||||
local_endurance,
|
||||
local_chance,
|
||||
minus);
|
||||
}
|
||||
}, obj);
|
||||
}
|
||||
}
|
||||
|
||||
void BillyObjects::change_carac_tools(const tools &arg,
|
||||
CharacterSheet &sheet,
|
||||
Characteristic &localHabilete,
|
||||
Characteristic &localAdresse,
|
||||
Characteristic &localEndurance,
|
||||
Characteristic &localChance,
|
||||
const std::function<std::uint32_t(std::uint32_t,
|
||||
std::uint32_t)> &operation) noexcept {
|
||||
CharacterSheet &sheet,
|
||||
Characteristic &localHabilete,
|
||||
Characteristic &localAdresse,
|
||||
Characteristic &localEndurance,
|
||||
Characteristic &localChance,
|
||||
const std::function<std::uint32_t(std::uint32_t, std::uint32_t)> &operation) noexcept {
|
||||
switch (arg) {
|
||||
case tools::Fourche:
|
||||
localHabilete.materiel = operation(localHabilete.materiel, 1);
|
||||
|
@ -114,14 +113,14 @@ namespace character {
|
|||
}
|
||||
|
||||
void BillyObjects::change_carac_equipment(const equipments &arg,
|
||||
CharacterSheet &sheet,
|
||||
Characteristic &localHabilete,
|
||||
Characteristic &localAdresse,
|
||||
Characteristic &localEndurance,
|
||||
Characteristic &localChance,
|
||||
const std::function<std::uint32_t(std::uint32_t, std::uint32_t)> &primary,
|
||||
const std::function<std::uint32_t(std::uint32_t,
|
||||
std::uint32_t)> &complement) noexcept {
|
||||
CharacterSheet &sheet,
|
||||
Characteristic &localHabilete,
|
||||
Characteristic &localAdresse,
|
||||
Characteristic &localEndurance,
|
||||
Characteristic &localChance,
|
||||
const std::function<std::uint32_t(std::uint32_t, std::uint32_t)> &primary,
|
||||
const std::function<std::uint32_t(std::uint32_t,
|
||||
std::uint32_t)> &complement) noexcept {
|
||||
switch (arg) {
|
||||
case equipments::Chainmail:
|
||||
localHabilete.materiel = complement(localHabilete.materiel, 1);
|
||||
|
@ -143,12 +142,12 @@ namespace character {
|
|||
}
|
||||
|
||||
void BillyObjects::change_carac_weapon(const weapons &arg,
|
||||
CharacterSheet &sheet,
|
||||
Characteristic &localHabilete,
|
||||
Characteristic &localAdresse,
|
||||
Characteristic &localEndurance,
|
||||
const std::function<std::uint32_t(std::uint32_t,
|
||||
std::uint32_t)> &operation) noexcept {
|
||||
CharacterSheet &sheet,
|
||||
Characteristic &localHabilete,
|
||||
Characteristic &localAdresse,
|
||||
Characteristic &localEndurance,
|
||||
const std::function<std::uint32_t(std::uint32_t,
|
||||
std::uint32_t)> &operation) noexcept {
|
||||
switch (arg) {
|
||||
case weapons::Sword:
|
||||
localHabilete.materiel = operation(localHabilete.materiel, 4);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue