dont use wands that are just null shot/nolla (doesn't account for multi casts or shuffle wands)

This commit is contained in:
bgkillas 2024-08-30 07:18:53 -04:00
parent ed9438fcd3
commit 0022b2abcc
5 changed files with 21 additions and 8 deletions

View file

@ -2808,9 +2808,9 @@ dependencies = [
[[package]]
name = "rustls-native-certs"
version = "0.7.2"
version = "0.7.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "04182dffc9091a404e0fc069ea5cd60e5b866c3adf881eff99a32d048242dffa"
checksum = "e5bfb394eeed242e909609f56089eecfe5fda225042e8b171791b9c95f5931e5"
dependencies = [
"openssl-probe",
"rustls-pemfile",

View file

@ -325,7 +325,6 @@ impl Modmanager {
if ui.button(tr("button_continue")).clicked() {
info!("Switching to Done state");
self.state = State::Done;
return;
};
}
}
@ -376,7 +375,7 @@ fn extract_and_remove_zip(zip_file: PathBuf, extract_to: PathBuf) -> Result<(),
Ok(())
}
fn extract_zip(zip_file: &PathBuf, extract_to: PathBuf) -> Result<(), eyre::Error> {
fn extract_zip(zip_file: &Path, extract_to: PathBuf) -> Result<(), eyre::Error> {
let zip_file = zip_file.canonicalize().unwrap_or(zip_file.to_path_buf());
let reader = File::open(&zip_file)
.wrap_err_with(|| format!("Failed to open zip file: {}", zip_file.display()))?;

View file

@ -198,12 +198,12 @@ impl Release {
.send()
.wrap_err_with(|| format!("Failed to request asset list from {}", self.assets_url))?;
Ok(response.json().wrap_err_with(|| {
response.json().wrap_err_with(|| {
format!(
"Failed to request asset list from {}: couldn't parse json",
self.assets_url
)
})?)
})
}
}

View file

@ -101,6 +101,7 @@ impl Display for PeerState {
type Channel<T> = (Sender<T>, Receiver<T>);
/// Represents a network endpoint. Can be constructed in either `host` or `client` mode.
///
/// Client can only connect to hosts, but they are able to send messages to any other peer connected to the same host, including the host itself.
#[derive(Clone)]
pub struct Peer {

View file

@ -143,22 +143,34 @@ local function find_new_wand()
state.attack_wand = wandfinder.find_attack_wand(state.empty_wands)
do_kick = true
else
local bad_mod = false
local is_any_not_empty = false
for _, child in pairs(children) do
local is_proj = false
local is_bad_proj = false
local sprites = EntityGetComponentIncludingDisabled(child, "SpriteComponent")
for _, sprite in pairs(sprites) do
local image = ComponentGetValue2(sprite, "image_file")
if image == "data/ui_gfx/inventory/item_bg_projectile.png"
--or image == "data/ui_gfx/inventory/item_bg_material.png"
--or image == "data/ui_gfx/inventory/item_bg_static_projectile.png"
or image == "data/ui_gfx/inventory/item_bg_other.png" then
is_proj = true
break
elseif image == "data/ui_gfx/inventory/item_bg_material.png"
or image == "data/ui_gfx/inventory/item_bg_static_projectile.png" then
is_bad_proj = true
break
end
end
if (is_proj or is_bad_proj) and bad_mod then
bad_mod = false
goto continue
end
local spell = EntityGetFirstComponentIncludingDisabled(child, "ItemActionComponent")
local spell_name = ComponentGetValue2(spell, "action_id")
if spell_name == "NOLLA" or spell_name == "ZERO_DAMAGE" then
bad_mod = true
goto continue
end
local dont_use = false
for _, name in ipairs(ignore_spell) do
if name == spell_name then
@ -171,6 +183,7 @@ local function find_new_wand()
is_any_not_empty = true
break
end
::continue::
end
if not is_any_not_empty then
table.insert(state.empty_wands, state.attack_wand)