diff --git a/integration-harness/tests/beginner_skills.rs b/integration-harness/tests/beginner_skills.rs index 0dc8b72e7..6f4e60beb 100644 --- a/integration-harness/tests/beginner_skills.rs +++ b/integration-harness/tests/beginner_skills.rs @@ -2,7 +2,9 @@ //! through CLOSE_RANGE_ATTACK, and Recovery and Nimble Feet are buffs from //! USE_SKILL. Each spends its MP, and the map sees it used. -use integration_harness::hunting::{attack, cancel_buff, skill_attack, spend_sp, use_skill}; +use integration_harness::hunting::{ + attack, cancel_buff, magic_attack, skill_attack, spend_sp, use_skill, +}; use integration_harness::preconditions::load_harness_config_or_fail; use integration_harness::trace::{barrier, read_for, send, stat, until, warp, Trace}; use integration_harness::{login_to_world_session, WorldSession}; @@ -75,7 +77,10 @@ async fn beginner_skills_spend_mp_and_take_effect() { // Three Snails at level 1 does exactly 10, for 3 of a new beginner's 5 MP. until(&mut a.connection, ta, |t| !t.field.alive(SNAIL).is_empty()).await; let target = ta.field.alive(SNAIL)[0]; - send(&mut a.connection, skill_attack(THREE_SNAILS, target, 11)).await; + // v83 casts Three Snails (MAGIC_ATTACK), and a spell past its cap is + // refused outright; a physical one could be on a mob iced by Combo + // Tempest, which only the field knows (P234). + send(&mut a.connection, magic_attack(THREE_SNAILS, target, 11)).await; send(&mut a.connection, skill_attack(RECOVERY, target, 1)).await; barrier(&mut a.connection, "refused", ta).await; // Still the 5 MP from the level-up update. diff --git a/integration-harness/tests/ferries.rs b/integration-harness/tests/ferries.rs index c89853ec1..dd7833c98 100644 --- a/integration-harness/tests/ferries.rs +++ b/integration-harness/tests/ferries.rs @@ -21,6 +21,8 @@ use tokio::time::Duration; const LITH_HARBOR: i32 = 104_000_000; const RIEN_DOCK: i32 = 140_020_300; +/// The town Puro's choice names (the dock is "Dangerous Forest"). +const RIEN: i32 = 140_000_000; const LITH_TO_RIEN: i32 = 200_090_060; const RIEN_TO_LITH: i32 = 200_090_070; const ORBIS_FERRY_PLATFORM: i32 = 200_000_161; @@ -97,13 +99,27 @@ async fn puro_ferries_a_player_to_rien_and_back_on_a_countdown() { let mut session = traveller(&config, 1600, LITH_HARBOR).await; let m = session.character_name.clone(); let c = &mut session.connection; - for (from, puro, ride, to, meso) in [ - (LITH_HARBOR, PURO_IN_LITH, LITH_TO_RIEN, RIEN_DOCK, 800), - (RIEN_DOCK, PURO_IN_RIEN, RIEN_TO_LITH, LITH_HARBOR, 0), + for (from, puro, ride, to, town, meso) in [ + ( + LITH_HARBOR, + PURO_IN_LITH, + LITH_TO_RIEN, + RIEN_DOCK, + RIEN, + 800, + ), + ( + RIEN_DOCK, + PURO_IN_RIEN, + RIEN_TO_LITH, + LITH_HARBOR, + LITH_HARBOR, + 0, + ), ] { let t = step(c, &format!("{m} talk"), talk(from, puro)).await; assert_eq!(t.prompts, [(puro, 4)]); - assert!(t.prompt_texts[0].contains(&format!("#m{to}#"))); + assert!(t.prompt_texts[0].contains(&format!("#m{town}#"))); let t = step(c, &format!("{m} pick"), answer(4, 1, Some(0))).await; assert_eq!(t.prompts, [(puro, 1)]); let mut t = step(c, &format!("{m} yes"), answer(1, 1, None)).await; diff --git a/integration-harness/tests/monster_book.rs b/integration-harness/tests/monster_book.rs index b52392ae1..8a27ba9c0 100644 --- a/integration-harness/tests/monster_book.rs +++ b/integration-harness/tests/monster_book.rs @@ -59,7 +59,11 @@ async fn snail_cards_fill_the_book_and_persist_with_the_cover() { pickup(card.object_id, card.x, card.y), ) .await; - until(&mut hunter.connection, &mut h, |t| t.cards.len() > kill).await; + // The card goes in first; the map hears it taken after (P259). + until(&mut hunter.connection, &mut h, |t| { + t.cards.len() > kill && !t.field.removals(card.object_id).is_empty() + }) + .await; assert_eq!( h.field.removals(card.object_id), [Some(hunter.character_id)] diff --git a/integration-harness/tests/snipe.rs b/integration-harness/tests/snipe.rs index 45314609e..0da4c8c93 100644 --- a/integration-harness/tests/snipe.rs +++ b/integration-harness/tests/snipe.rs @@ -43,11 +43,15 @@ async fn snipe_hits_hard_and_cools_down() { until(c, &mut h, |t| t.field.alive(SNAIL).len() >= 2).await; let snails = h.field.alive(SNAIL); - // More than 199,999 is refused. + // More than 199,999 is refused. A shot past every cap could be on a mob + // iced by Combo Tempest, which only the field knows, so it's spent + // (and cools down) before the field refuses it (P234). send(c, ranged_attack(SNIPE, QUIVER, snails[0], 200_000)).await; + until(c, &mut h, |t| t.cooldowns.contains(&(SNIPE, 4))).await; read_for(c, &mut h, 400).await; assert!(!h.field.killed.contains(&snails[0])); - assert!(h.cooldowns.is_empty()); + until(c, &mut h, |t| t.cooldowns.contains(&(SNIPE, 0))).await; + h.cooldowns.clear(); // 199,999 kills, and the client hears of the cooltime. send(c, ranged_attack(SNIPE, QUIVER, snails[0], 199_999)).await;