its a rng drop so its random but boss pets have thresholds when you get a certain amount of kills zilyana pet threshold is 1k kills so after that and each 1k kills the rate will go up and keep going up each 1k kills up too a certain persent and the pet drop rate for zilyana is 1 in 5000 or 1 in 1000 for hardmode but every 1k kills will raise drop rates for ever kill after that